33#include "hpl_sercom_config.h"
44#include "samd/sercom.h"
55
6- void common_hal_spitarget_spi_target_construct (busio_spi_obj_t * self ,
6+ void common_hal_spitarget_spi_target_construct (spitarget_spi_target_obj_t * self ,
77 const mcu_pin_obj_t * sck , const mcu_pin_obj_t * mosi ,
88 const mcu_pin_obj_t * miso , const mcu_pin_obj_t * ss ) {
99 Sercom * sercom = NULL ;
@@ -146,7 +146,7 @@ void common_hal_spitarget_spi_target_construct(busio_spi_obj_t *self,
146146 spi_m_sync_enable (& self -> spi_desc );
147147}
148148
149- void common_hal_spitarget_spi_target_deinit (busio_spi_obj_t * self ) {
149+ void common_hal_spitarget_spi_target_deinit (spitarget_spi_target_obj_t * self ) {
150150 if (common_hal_busio_spi_deinited (self )) {
151151 return ;
152152 }
@@ -161,11 +161,11 @@ void common_hal_spitarget_spi_target_deinit(busio_spi_obj_t *self) {
161161 self -> clock_pin = NO_PIN ;
162162}
163163
164- void common_hal_spitarget_spi_target_deinited (busio_spi_obj_t * self ) {
164+ void common_hal_spitarget_spi_target_deinited (spitarget_spi_target_obj_t * self ) {
165165 return self -> clock_pin == NO_PIN ;
166166}
167167
168- void common_hal_spitarget_spi_target_transfer_start (busio_spi_obj_t * self ,
168+ void common_hal_spitarget_spi_target_transfer_start (spitarget_spi_target_obj_t * self ,
169169 uint8_t * miso_packet , uint8_t * mosi_packet , size_t len ) {
170170 if (len == 0 ) {
171171 return ;
@@ -209,11 +209,11 @@ void common_hal_spitarget_spi_target_transfer_start(busio_spi_obj_t *self,
209209 }
210210}
211211
212- bool common_hal_spitarget_spi_target_transfer_is_finished (busio_spi_obj_t * self ) {
212+ bool common_hal_spitarget_spi_target_transfer_is_finished (spitarget_spi_target_obj_t * self ) {
213213 return self -> running_dma .failure == 1 || shared_dma_transfer_finished (self -> running_dma );
214214}
215215
216- void common_hal_spitarget_spi_target_transfer_close (busio_spi_obj_t * self ) {
216+ void common_hal_spitarget_spi_target_transfer_close (spitarget_spi_target_obj_t * self ) {
217217 if (self -> running_dma .failure == 1 ) {
218218 return 0 ;
219219 }
0 commit comments