This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

identifier "p_tx_buffer" is undefined on nrf52832

I am trying to add spi communication to the twi_master_with_twis_slave project because I need to communicate with two different sensors. I have included nrf_drv_spi.h and enabled SPI in the config file, but I keep getting an error for the buffer identifiers not being defined. I can't seem to find where these are supposed to be defined to help me figure out what I am missing.

here is my build output: *** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin' Build target 'nrf52832_xxaa' compiling nrf_drv_spi.c... C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\4.0.0-2.alpha\spi_master\nrf_drv_spi.c(519): error: #20: identifier "p_tx_buffer" is undefined

SSERT(p_tx_buffer != NULL || tx_buffer_length == 0); C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\4.0.0-2.alpha\spi_master\nrf_drv_spi.c(519): error: #20: identifier "tx_buffer_length" is undefined

SSERT(p_tx_buffer != NULL || tx_buffer_length == 0); C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\4.0.0-2.alpha\spi_master\nrf_drv_spi.c(520): error: #20: identifier "p_rx_buffer" is undefined

SSERT(p_rx_buffer != NULL || rx_buffer_length == 0); C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\4.0.0-2.alpha\spi_master\nrf_drv_spi.c(520): error: #20: identifier "rx_buffer_length" is undefined

SSERT(p_rx_buffer != NULL || rx_buffer_length == 0); C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\4.0.0-2.alpha\spi_master\nrf_drv_spi.c: 0 warnings, 4 errors "._build\nrf52832_xxaa.axf" - 4 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:01

Thanks for the help,

Cole

Related