Functions | |
s32 | MIOS32_IIC_MIDI_Init (u32 mode) |
s32 | MIOS32_IIC_MIDI_ScanInterfaces (void) |
s32 | MIOS32_IIC_MIDI_CheckAvailable (u8 iic_port) |
s32 | MIOS32_IIC_MIDI_RS_OptimisationSet (u8 iic_port, u8 enable) |
s32 | MIOS32_IIC_MIDI_RS_OptimisationGet (u8 iic_port) |
s32 | MIOS32_IIC_MIDI_RS_Reset (u8 iic_port) |
s32 | MIOS32_IIC_MIDI_Periodic_mS (void) |
s32 | MIOS32_IIC_MIDI_PackageSend_NonBlocking (u8 iic_port, mios32_midi_package_t package) |
s32 | MIOS32_IIC_MIDI_PackageSend (u8 iic_port, mios32_midi_package_t package) |
s32 | MIOS32_IIC_MIDI_PackageReceive_NonBlocking (u8 iic_port, mios32_midi_package_t *package) |
s32 | MIOS32_IIC_MIDI_PackageReceive (u8 iic_port, mios32_midi_package_t *package) |
IIC MIDI layer for MIOS32
Except for MIOS32_IIC_MIDI_ScanInterfaces applications shouldn't call these functions directly, instead please use MIOS32_MIDI layer functions
This function checks the availability of the MBHP_IIC_MIDI module taken from the last results of MIOS32_IIC_MIDI_ScanInterface()
[in] | iic_port | module number (0..7) |
Initializes IIC MIDI layer
[in] | mode | currently only mode 0 supported |
s32 MIOS32_IIC_MIDI_PackageReceive | ( | u8 | iic_port, | |
mios32_midi_package_t * | package | |||
) |
This function checks for a new package
(blocking function)
[in] | iic_port | IIC_MIDI module number (0..7) |
[out] | package | pointer to MIDI package (received package will be put into the given variable) |
s32 MIOS32_IIC_MIDI_PackageReceive_NonBlocking | ( | u8 | iic_port, | |
mios32_midi_package_t * | package | |||
) |
This function checks for a new package
[in] | iic_port | IIC_MIDI module number (0..7) |
[out] | package | pointer to MIDI package (received package will be put into the given variable) |
s32 MIOS32_IIC_MIDI_PackageSend | ( | u8 | iic_port, | |
mios32_midi_package_t | package | |||
) |
This function sends a new MIDI package to the selected IIC_MIDI port (blocking function)
[in] | iic_port | IIC_MIDI module number (0..7) |
[in] | package | MIDI package |
s32 MIOS32_IIC_MIDI_PackageSend_NonBlocking | ( | u8 | iic_port, | |
mios32_midi_package_t | package | |||
) |
This function sends a new MIDI package to the selected IIC_MIDI port
[in] | iic_port | IIC_MIDI module number (0..7) |
[in] | package | MIDI package |
s32 MIOS32_IIC_MIDI_Periodic_mS | ( | void | ) |
This function should be called periodically each mS to handle timeout and expire counters.
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!
This function returns the running status optimisation enable/disable flag for the given MIDI OUT port.
[in] | iic_port | module number (0..7) |
This function enables/disables running status optimisation for a given MIDI OUT port to improve bandwidth if MIDI events with the same status byte are sent back-to-back.
Note that the optimisation is enabled by default.
[in] | iic_port | module number (0..7) |
[in] | enable | 0=optimisation disabled, 1=optimisation enabled |
This function resets the current running status, so that it will be sent again with the next MIDI Out package.
[in] | iic_port | module number (0..7) |
s32 MIOS32_IIC_MIDI_ScanInterfaces | ( | void | ) |
Scans all MBHP_IIC_MIDI modules to check the availablility by sending dummy requests and checking the ACK response.
Per module, this procedure takes at least ca. 25 uS, if no module is connected ca. 75 uS (3 retries), or even more if we have to wait for completion of the previous IIC transfer.
Therefore this function should only be rarely used (e.g. once per second), and the state should be saved somewhere in the application