MIOS32_SPI_MIDI
Detailed Description
SPI MIDI layer for MIOS32
Applications shouldn't call these functions directly, instead please use MIOS32_MIDI layer functions
Define Documentation
#define MIOS32_SPI_MIDI_MUTEX_GIVE {} |
#define MIOS32_SPI_MIDI_MUTEX_TAKE {} |
#define MIOS32_SPI_MIDI_USE_MUTEX 0 |
Function Documentation
s32 MIOS32_SPI_MIDI_CheckAvailable |
( |
u8 |
spi_midi_port |
) |
|
This function checks the availability of a SPI MIDI port as configured with MIOS32_SPI_MIDI_NUM_PORTS
- Parameters:
-
[in] | spi_midi_port | module number (0..7) |
- Returns:
- 1: interface available
-
0: interface not available
- Note:
- Applications shouldn't call this function directly, instead please use MIOS32_MIDI layer functions
s32 MIOS32_SPI_MIDI_Enabled |
( |
void |
|
) |
|
- Returns:
- != 0 if SPI MIDI has been enabled in MIOS32 bootloader
s32 MIOS32_SPI_MIDI_Init |
( |
u32 |
mode |
) |
|
This function checks for a new package
- Parameters:
-
[out] | package | pointer to MIDI package (received package will be put into the given variable) |
- Returns:
- -1 if no package in buffer
-
>= 0: number of packages which are still in the buffer
- Note:
- Applications shouldn't call this function directly, instead please use MIOS32_MIDI layer functions
This function puts a new MIDI package into the Tx buffer (blocking function)
- Parameters:
-
[in] | package | MIDI package |
- Returns:
- 0: no error
-
-1: SPI not configured
- Note:
- Applications shouldn't call this function directly, instead please use MIOS32_MIDI layer functions
s32 MIOS32_SPI_MIDI_Periodic_mS |
( |
void |
|
) |
|
This function should be called periodically each mS to initiate a new SPI scan
Not for use in an application - this function is called from MIOS32_MIDI_Periodic_mS(), which is called by a task in the programming model!
- Returns:
- < 0 on errors