mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-16 19:20:30 +00:00
Add TinyUSB example
This commit is contained in:
1 parent
6921227ec8
commit
57a5c0ba38
40 files changed
+23502
-313
No files matched your search
@@ -84,12 +84,11 @@ int main(void) {
|
||||
mg_timer_add(&mgr, 500, MG_TIMER_REPEAT, blink_cb, &mgr);
|
||||
|
||||
// Initialize Mongoose network stack
|
||||
// Specify MAC address, either set use_dhcp or enter a static config.
|
||||
// For static configuration, specify IP/mask/GW in network byte order
|
||||
// Specify MAC address, and IP/mask/GW in network byte order for static
|
||||
// IP configuration. If IP/mask/GW are unset, DHCP is going to be used
|
||||
struct mip_driver_tm4c driver_data = {.mdc_cr = 1}; // See driver_tm4c.h
|
||||
struct mip_if mif = {
|
||||
.mac = {2, 0, 1, 2, 3, 5},
|
||||
.use_dhcp = true,
|
||||
.driver = &mip_driver_tm4c,
|
||||
.driver_data = &driver_data,
|
||||
};
|
||||
|
||||
@@ -56,14 +56,13 @@ static void server(void *args) {
|
||||
mg_log_set(MG_LL_DEBUG); // Set log level
|
||||
|
||||
// Initialise Mongoose network stack
|
||||
// Specify MAC address, either set use_dhcp or enter a static config.
|
||||
// For static configuration, specify IP/mask/GW in network byte order
|
||||
// Specify MAC address, and IP/mask/GW in network byte order for static
|
||||
// IP configuration. If IP/mask/GW are unset, DHCP is going to be used
|
||||
MG_INFO(("Initializing Ethernet driver"));
|
||||
ethernet_init();
|
||||
struct mip_driver_tm4c driver_data = {.mdc_cr = 1}; // See driver_tm4c.h
|
||||
struct mip_if mif = {
|
||||
.mac = {2, 0, 1, 2, 3, 5},
|
||||
.use_dhcp = true,
|
||||
.driver = &mip_driver_tm4c,
|
||||
.driver_data = &driver_data,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user