AnsweredAssumed Answered

problem about the spi low level driver

Question asked by botao yang on Dec 15, 2014
Latest reply on Dec 15, 2014 by Radek Sestak

I am learning to use the MQX , and I want to how the spi driver works. But I can't see definition of these functions,

typedef _mqx_int (_CODE_PTR_ SPI_DEVIF_INIT_FPTR)(const void _PTR_ init_data_ptr, pointer *io_info_ptr_ptr);

typedef _mqx_int (_CODE_PTR_ SPI_DEVIF_DEINIT_FPTR)(pointer io_info_ptr);

typedef _mqx_int (_CODE_PTR_ SPI_DEVIF_SETPARAM_FPTR)(pointer io_info_ptr, SPI_PARAM_STRUCT_PTR spi_param_ptr);

typedef _mqx_int (_CODE_PTR_ SPI_DEVIF_TX_RX_FPTR)(pointer io_info_ptr, uint_8_ptr txbuf, uint_8_ptr rxbuf, uint_32 len);

typedef _mqx_int (_CODE_PTR_ SPI_DEVIF_CS_DEASSERT_FPTR)(pointer io_info_ptr);

typedef _mqx_int (_CODE_PTR_ SPI_DEVIF_IOCTL_FPTR)(pointer io_info_ptr, SPI_PARAM_STRUCT_PTR spi_param_ptr, uint_32 cmd, uint_32_ptr cmd_param_ptr);

for example, in the spi.c,

   result = driver_data->DEVIF->TX_RX(driver_data->DEVIF_DATA, (uint_8_ptr)wrbuf, (uint_8_ptr)rdbuf, len);


I can't see the definition of the TX_RX function.

is there anybody can tell me what to do ?

thank you !