So, I'm slowly advancing my experience with STM32 HAL, and have got to the point where I am writing an embedded application that uses two SPI ports, and I need interrupt handling on end of transfer for each port....
Except it seems like there's only one SPI interrupt callback function in HAL? (kind of like there's the one SPI command function too, though that is fine to just call from multiple places! a callback that is tied into the internal operation of a driver for an external IC, not so much...)
in my ideal dreamland fantasy world I could link whatever callback function I wanted when I do the SPI command to set the peripheral off, which will eventually generate the interrupt that calls the callback... But it seems we don't all live in my happy dreamland unfortunately... so.. back to the reality of STM32 HAL...
I guess I'm going to have to move my callback function somewhere else, so it can deal with two separate SPI peripherals, and write the function so it does totally different things depending on which SPI interrupt event has called it.
Am I reading this situation right? this seems pretty blah.
(PS, I don't want to be too down on STM32cube.. I'm learning it more, the more I use it, and finding that *overall* it's useful, and once a peripheral is mastered it cecomes very fast to use again on another project, which is nice... bugs haven't really been a problem so far either - though have to admit the learning curve without having an existing expert on hand I can just ask for tips from is inhumane.... I am still really feeling the lack of a "so you want to use STM32HAL to develop something useful" guide that just explains the overall approach and what everything is meant to do, for someone with pre existing embedded code experience...)
anyway.. sorry for the ramble...
Anyone who knows - is what I'm planning to do for this callback the correct approach when using STM32 HAL with multiple SPI peripherals that need callbacks to implement different things?
thanks in advance!!