Skip to content

Commit e3af90a

Browse files
committed
drivers/ninaw10: Use the nina_wifi_bsp.c file of the NINAW10 driver.
And remove the MP_WEAK modifiers from that file, as suggested in the review. Signed-off-by: robert-hh <robert@hammelrath.com>
1 parent a9796b5 commit e3af90a

File tree

3 files changed

+8
-81
lines changed

3 files changed

+8
-81
lines changed

drivers/ninaw10/nina_wifi_bsp.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
#define MICROPY_HW_NINA_CS MICROPY_HW_NINA_GPIO1
5252
#endif
5353

54-
MP_WEAK int nina_bsp_init(void) {
54+
int nina_bsp_init(void) {
5555
mp_hal_pin_output(MICROPY_HW_NINA_CS);
5656
mp_hal_pin_input(MICROPY_HW_NINA_ACK);
5757
mp_hal_pin_output(MICROPY_HW_NINA_RESET);
@@ -83,7 +83,7 @@ MP_WEAK int nina_bsp_init(void) {
8383
return 0;
8484
}
8585

86-
MP_WEAK int nina_bsp_deinit(void) {
86+
int nina_bsp_deinit(void) {
8787
mp_hal_pin_output(MICROPY_HW_NINA_CS);
8888
mp_hal_pin_write(MICROPY_HW_NINA_CS, 1);
8989

@@ -99,29 +99,29 @@ MP_WEAK int nina_bsp_deinit(void) {
9999
return 0;
100100
}
101101

102-
MP_WEAK int nina_bsp_atomic_enter(void) {
102+
int nina_bsp_atomic_enter(void) {
103103
#if MICROPY_ENABLE_SCHEDULER
104104
mp_sched_lock();
105105
#endif
106106
return 0;
107107
}
108108

109-
MP_WEAK int nina_bsp_atomic_exit(void) {
109+
int nina_bsp_atomic_exit(void) {
110110
#if MICROPY_ENABLE_SCHEDULER
111111
mp_sched_unlock();
112112
#endif
113113
return 0;
114114
}
115115

116-
MP_WEAK int nina_bsp_read_irq(void) {
116+
int nina_bsp_read_irq(void) {
117117
#ifdef MICROPY_HW_NINA_GPIO0
118118
return mp_hal_pin_read(MICROPY_HW_NINA_GPIO0);
119119
#else
120120
return 1;
121121
#endif
122122
}
123123

124-
MP_WEAK int nina_bsp_spi_slave_select(uint32_t timeout) {
124+
int nina_bsp_spi_slave_select(uint32_t timeout) {
125125
// Wait for ACK to go low.
126126
for (mp_uint_t start = mp_hal_ticks_ms(); mp_hal_pin_read(MICROPY_HW_NINA_ACK) == 1; mp_hal_delay_ms(1)) {
127127
if (timeout && ((mp_hal_ticks_ms() - start) >= timeout)) {
@@ -143,12 +143,12 @@ MP_WEAK int nina_bsp_spi_slave_select(uint32_t timeout) {
143143
return 0;
144144
}
145145

146-
MP_WEAK int nina_bsp_spi_slave_deselect(void) {
146+
int nina_bsp_spi_slave_deselect(void) {
147147
mp_hal_pin_write(MICROPY_HW_NINA_CS, 1);
148148
return 0;
149149
}
150150

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) {
152152
mp_obj_t mp_wifi_spi = MP_STATE_PORT(mp_wifi_spi);
153153
((mp_machine_spi_p_t *)MP_OBJ_TYPE_GET_SLOT(&machine_spi_type, protocol))->transfer(mp_wifi_spi, size, tx_buf, rx_buf);
154154
#if NINA_DEBUG

ports/mimxrt/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ SRC_C += \
284284
mpnetworkport.c \
285285
msc_disk.c \
286286
network_lan.c \
287-
nina_wifi_bsp.c \
288287
pendsv.c \
289288
pin.c \
290289
sdcard.c \

ports/mimxrt/nina_wifi_bsp.c

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)