summaryrefslogtreecommitdiffstatshomepage
path: root/stm/usart.c
diff options
context:
space:
mode:
Diffstat (limited to 'stm/usart.c')
-rw-r--r--stm/usart.c8
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);