Hello,
I've asked a few questions on here already about adding SPI to my projects and have not gotten anywhere. I have realized however, that the project I am trying to re-develop (old devs left the company and code got lost) used Legacy NPI to communicate between a BLE module and an MSP430. So I finally have realized I need to add Legacy NPI to my CC2640R2F simpleCentral project to maintain compatibility with the MSP430 as it is now.
What I am struggling with is actually figuring out how to implement this in my code. All I've seen around this forum through my searching is that people recommend to base my project off of the host_test project, but I can't see how to do this. There are several different files in the NPI folder that I know I need to include, and then I look through the files and there's all these initialization functions that need to be passed all sorts of arguments and there's callback functions for all sorts of events but I don't see how to actually use any of it. I've spent weeks on this now and am going crazy trying so many different things.
I know I'll have to add the NPI_USE_SPI preprocessor definition, and I know I'll need some RX and TX buffers to hold incoming and outgoing data, but how do I take a RX buffer full of data and say "SendMyDataOnSPI()" so that it actually goes down the wires to the MSP430? I once found an outdated wiki article explaining what lines of code to add to the application but this doesn't work anymore.
Any help is greatly appriciated.