mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-05 13:14:11 +08:00
commit
ec02ccf5b2
@ -35,14 +35,14 @@ static void timer_fn(void *arg) {
|
|||||||
int main(void) {
|
int main(void) {
|
||||||
gpio_output(LED); // Setup green LED
|
gpio_output(LED); // Setup green LED
|
||||||
uart_init(UART_DEBUG, 115200); // Initialise debug printf
|
uart_init(UART_DEBUG, 115200); // Initialise debug printf
|
||||||
|
ethernet_init(); // Initialise ethernet pins
|
||||||
MG_INFO(("Starting, CPU freq %g MHz", (double) SystemCoreClock / 1000000));
|
MG_INFO(("Starting, CPU freq %g MHz", (double) SystemCoreClock / 1000000));
|
||||||
|
|
||||||
struct mg_mgr mgr; // Initialise
|
struct mg_mgr mgr; // Initialise
|
||||||
mg_mgr_init(&mgr); // Mongoose event manager
|
mg_mgr_init(&mgr); // Mongoose event manager
|
||||||
mg_log_set(MG_LL_DEBUG); // Set log level
|
mg_log_set(MG_LL_DEBUG); // Set log level
|
||||||
|
|
||||||
// Initialise Mongoose network stack
|
// Initialise Mongoose network stack
|
||||||
ethernet_init(); // Initialise ethernet pins
|
|
||||||
struct mg_tcpip_driver_stm32h_data driver_data = {.mdc_cr = 4};
|
struct mg_tcpip_driver_stm32h_data driver_data = {.mdc_cr = 4};
|
||||||
struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(),
|
struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(),
|
||||||
// Uncomment below for static configuration:
|
// Uncomment below for static configuration:
|
||||||
|
Loading…
Reference in New Issue
Block a user