diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-08 16:40:08 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-08 16:40:08 +0000 |
commit | c3d35c6ac7348e8dc9072bb67b2c62294764fe00 (patch) | |
tree | f7eed83b56bb6814bd78b3c1b8fddb7df3b74ad2 /stm/usart.c | |
parent | 01d50d0d586a0e2630613120336faf75277d22d6 (diff) | |
download | micropython-c3d35c6ac7348e8dc9072bb67b2c62294764fe00.tar.gz micropython-c3d35c6ac7348e8dc9072bb67b2c62294764fe00.zip |
stm: Put pyb module in ROM.
Diffstat (limited to 'stm/usart.c')
-rw-r--r-- | stm/usart.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/stm/usart.c b/stm/usart.c index 78d9a0fee4..ac457b61f5 100644 --- a/stm/usart.c +++ b/stm/usart.c @@ -235,7 +235,7 @@ static MP_DEFINE_CONST_FUN_OBJ_1(usart_obj_rx_char_obj, usart_obj_rx_char); static MP_DEFINE_CONST_FUN_OBJ_2(usart_obj_tx_char_obj, usart_obj_tx_char); static MP_DEFINE_CONST_FUN_OBJ_2(usart_obj_tx_str_obj, usart_obj_tx_str); -static const mp_method_t usart_methods[] = { +STATIC const mp_method_t usart_methods[] = { { "status", &usart_obj_status_obj }, { "recv_chr", &usart_obj_rx_char_obj }, { "send_chr", &usart_obj_tx_char_obj }, @@ -243,14 +243,14 @@ static const mp_method_t usart_methods[] = { { NULL, NULL }, }; -static const mp_obj_type_t usart_obj_type = { +STATIC const mp_obj_type_t usart_obj_type = { { &mp_type_type }, .name = MP_QSTR_Usart, .print = usart_obj_print, .methods = usart_methods, }; -mp_obj_t pyb_Usart(mp_obj_t usart_id, mp_obj_t baudrate) { +STATIC mp_obj_t pyb_Usart(mp_obj_t usart_id, mp_obj_t baudrate) { if (mp_obj_get_int(usart_id)>PYB_USART_MAX) { return mp_const_none; } @@ -264,3 +264,5 @@ mp_obj_t pyb_Usart(mp_obj_t usart_id, mp_obj_t baudrate) { o->is_enabled = true; return o; } + +MP_DEFINE_CONST_FUN_OBJ_2(pyb_Usart_obj, pyb_Usart); |