Skip to content

Commit 1aad399

Browse files
ok this is the one
1 parent 5657f8a commit 1aad399

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

ports/atmel-samd/common-hal/spitarget/SPITarget.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "common-hal/spitarget/SPITarget.h"
2+
#include "common-hal/busio/__init__.h"
23

34
#include "shared-bindings/spitarget/SPITarget.h"
45
#include "shared-bindings/microcontroller/Pin.h"
@@ -157,6 +158,10 @@ void common_hal_spitarget_spi_target_construct(spitarget_spi_target_obj_t *self,
157158
spi_m_sync_enable(&self->spi_desc);
158159
}
159160

161+
bool common_hal_spitarget_spi_target_deinited(spitarget_spi_target_obj_t *self) {
162+
return self->clock_pin == NO_PIN;
163+
}
164+
160165
void common_hal_spitarget_spi_target_deinit(spitarget_spi_target_obj_t *self) {
161166
if (common_hal_busio_spi_deinited(self)) {
162167
return;
@@ -172,10 +177,6 @@ void common_hal_spitarget_spi_target_deinit(spitarget_spi_target_obj_t *self) {
172177
self->clock_pin = NO_PIN;
173178
}
174179

175-
bool common_hal_spitarget_spi_target_deinited(spitarget_spi_target_obj_t *self) {
176-
return self->clock_pin == NO_PIN;
177-
}
178-
179180
void common_hal_spitarget_spi_target_transfer_start(spitarget_spi_target_obj_t *self,
180181
uint8_t *mosi_packet, const uint8_t *miso_packet, size_t len) {
181182
if (len == 0) {

0 commit comments

Comments
 (0)