-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
RP2: Add networking support. #7667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -170,26 +170,46 @@ extern const struct _mp_obj_module_t mp_module_onewire; | |
extern const struct _mp_obj_module_t mp_module_rp2; | ||
extern const struct _mp_obj_module_t mp_module_uos; | ||
extern const struct _mp_obj_module_t mp_module_utime; | ||
extern const struct _mp_obj_module_t mp_module_usocket; | ||
extern const struct _mp_obj_module_t mp_module_network; | ||
|
||
#if MICROPY_PY_USOCKET | ||
#define SOCKET_BUILTIN_MODULE { MP_ROM_QSTR(MP_QSTR_usocket), MP_ROM_PTR(&mp_module_usocket) }, | ||
#else | ||
#define SOCKET_BUILTIN_MODULE | ||
#endif | ||
#if MICROPY_PY_NETWORK | ||
#define NETWORK_BUILTIN_MODULE { MP_ROM_QSTR(MP_QSTR_network), MP_ROM_PTR(&mp_module_network) }, | ||
#define NETWORK_ROOT_POINTERS mp_obj_list_t mod_network_nic_list; | ||
#else | ||
#define NETWORK_BUILTIN_MODULE | ||
#define NETWORK_ROOT_POINTERS | ||
#endif | ||
|
||
#define MICROPY_PORT_BUILTIN_MODULES \ | ||
{ MP_OBJ_NEW_QSTR(MP_QSTR_machine), (mp_obj_t)&mp_module_machine }, \ | ||
{ MP_OBJ_NEW_QSTR(MP_QSTR__onewire), (mp_obj_t)&mp_module_onewire }, \ | ||
{ MP_OBJ_NEW_QSTR(MP_QSTR__rp2), (mp_obj_t)&mp_module_rp2 }, \ | ||
{ MP_ROM_QSTR(MP_QSTR_uos), MP_ROM_PTR(&mp_module_uos) }, \ | ||
{ MP_ROM_QSTR(MP_QSTR_utime), MP_ROM_PTR(&mp_module_utime) }, \ | ||
SOCKET_BUILTIN_MODULE \ | ||
NETWORK_BUILTIN_MODULE \ | ||
|
||
#ifndef MICROPY_BOARD_ROOT_POINTERS | ||
#define MICROPY_BOARD_ROOT_POINTERS | ||
#endif | ||
|
||
#define MICROPY_PORT_NETWORK_INTERFACES \ | ||
|
||
#define MICROPY_PORT_ROOT_POINTERS \ | ||
const char *readline_hist[8]; \ | ||
void *machine_pin_irq_obj[30]; \ | ||
void *rp2_pio_irq_obj[2]; \ | ||
void *rp2_state_machine_irq_obj[8]; \ | ||
void *rp2_uart_rx_buffer[2]; \ | ||
void *rp2_uart_tx_buffer[2]; \ | ||
MICROPY_BOARD_ROOT_POINTERS \ | ||
NETWORK_ROOT_POINTERS \ | ||
MICROPY_BOARD_ROOT_POINTERS \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dpgeorge can this be fixed in the code format ? It insists on indenting the last line in a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that would need to be done in the fix-up stage of |
||
|
||
#define MP_STATE_PORT MP_STATE_VM | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The zephyr port fails here because it defines PY_USOCKET.