51
51
#define MICROPY_HW_NINA_CS MICROPY_HW_NINA_GPIO1
52
52
#endif
53
53
54
- MP_WEAK int nina_bsp_init (void ) {
54
+ int nina_bsp_init (void ) {
55
55
mp_hal_pin_output (MICROPY_HW_NINA_CS );
56
56
mp_hal_pin_input (MICROPY_HW_NINA_ACK );
57
57
mp_hal_pin_output (MICROPY_HW_NINA_RESET );
@@ -83,7 +83,7 @@ MP_WEAK int nina_bsp_init(void) {
83
83
return 0 ;
84
84
}
85
85
86
- MP_WEAK int nina_bsp_deinit (void ) {
86
+ int nina_bsp_deinit (void ) {
87
87
mp_hal_pin_output (MICROPY_HW_NINA_CS );
88
88
mp_hal_pin_write (MICROPY_HW_NINA_CS , 1 );
89
89
@@ -99,29 +99,29 @@ MP_WEAK int nina_bsp_deinit(void) {
99
99
return 0 ;
100
100
}
101
101
102
- MP_WEAK int nina_bsp_atomic_enter (void ) {
102
+ int nina_bsp_atomic_enter (void ) {
103
103
#if MICROPY_ENABLE_SCHEDULER
104
104
mp_sched_lock ();
105
105
#endif
106
106
return 0 ;
107
107
}
108
108
109
- MP_WEAK int nina_bsp_atomic_exit (void ) {
109
+ int nina_bsp_atomic_exit (void ) {
110
110
#if MICROPY_ENABLE_SCHEDULER
111
111
mp_sched_unlock ();
112
112
#endif
113
113
return 0 ;
114
114
}
115
115
116
- MP_WEAK int nina_bsp_read_irq (void ) {
116
+ int nina_bsp_read_irq (void ) {
117
117
#ifdef MICROPY_HW_NINA_GPIO0
118
118
return mp_hal_pin_read (MICROPY_HW_NINA_GPIO0 );
119
119
#else
120
120
return 1 ;
121
121
#endif
122
122
}
123
123
124
- MP_WEAK int nina_bsp_spi_slave_select (uint32_t timeout ) {
124
+ int nina_bsp_spi_slave_select (uint32_t timeout ) {
125
125
// Wait for ACK to go low.
126
126
for (mp_uint_t start = mp_hal_ticks_ms (); mp_hal_pin_read (MICROPY_HW_NINA_ACK ) == 1 ; mp_hal_delay_ms (1 )) {
127
127
if (timeout && ((mp_hal_ticks_ms () - start ) >= timeout )) {
@@ -143,12 +143,12 @@ MP_WEAK int nina_bsp_spi_slave_select(uint32_t timeout) {
143
143
return 0 ;
144
144
}
145
145
146
- MP_WEAK int nina_bsp_spi_slave_deselect (void ) {
146
+ int nina_bsp_spi_slave_deselect (void ) {
147
147
mp_hal_pin_write (MICROPY_HW_NINA_CS , 1 );
148
148
return 0 ;
149
149
}
150
150
151
- MP_WEAK int nina_bsp_spi_transfer (const uint8_t * tx_buf , uint8_t * rx_buf , uint32_t size ) {
151
+ int nina_bsp_spi_transfer (const uint8_t * tx_buf , uint8_t * rx_buf , uint32_t size ) {
152
152
mp_obj_t mp_wifi_spi = MP_STATE_PORT (mp_wifi_spi );
153
153
((mp_machine_spi_p_t * )MP_OBJ_TYPE_GET_SLOT (& machine_spi_type , protocol ))-> transfer (mp_wifi_spi , size , tx_buf , rx_buf );
154
154
#if NINA_DEBUG
0 commit comments