![]() |
BLM_SCALAR_MASTER Driver
#define BLM_MAX_PACKETS 8 |
#define BLM_TIMEOUT_RELOAD_VALUE 10000 |
#define SYSEX_ACK 0x0f |
#define SYSEX_BLM_CMD_LAYOUT 0x01 |
#define SYSEX_BLM_CMD_REQUEST 0x00 |
#define SYSEX_DISACK 0x0e |
Include files Local definitions
#define SYSEX_DISACK_INVALID_COMMAND 0x0c |
#define SYSEX_DISACK_LESS_BYTES_THAN_EXP 0x01 |
#define SYSEX_DISACK_MORE_BYTES_THAN_EXP 0x02 |
enum sysex_cmd_state_t |
s32 BLM_SCALAR_MASTER_ButtonCallback_Init | ( | s32(*)(u8 blm, blm_scalar_master_element_t element_id, u8 button_x, u8 button_y, u8 button_depressed) | button_callback_func | ) |
Installs callback function for BLM16x16 buttons
blm_scalar_master_connection_state_t BLM_SCALAR_MASTER_ConnectionStateGet | ( | u8 | blm | ) |
Returns connection state to MBHP_BLM_SCALAR:
Installs callback function for faders
Initializes the BLM_SCALAR_MASTER driver Should be called from Init() during startup
[in] | mode | currently only mode 0 supported |
blm_scalar_master_colour_t BLM_SCALAR_MASTER_LED_Get | ( | u8 | blm, | |
blm_scalar_master_element_t | element_id, | |||
u8 | led_x, | |||
u8 | led_y | |||
) |
Returns the current colour of a LED
s32 BLM_SCALAR_MASTER_LED_Set | ( | u8 | blm, | |
blm_scalar_master_element_t | element_id, | |||
u8 | led_x, | |||
u8 | led_y, | |||
blm_scalar_master_colour_t | colour | |||
) |
Sets a LED to the given colour
mios32_midi_port_t BLM_SCALAR_MASTER_MIDI_PortGet | ( | u8 | blm | ) |
Returns the currently configured MIDI IN/OUT port for MBHP_BLM_SCALAR communication
s32 BLM_SCALAR_MASTER_MIDI_PortSet | ( | u8 | blm, | |
mios32_midi_port_t | port | |||
) |
Sets the IN/OUT port for MBHP_BLM_SCALAR communication
s32 BLM_SCALAR_MASTER_MIDI_Receive | ( | mios32_midi_port_t | port, | |
mios32_midi_package_t | midi_package | |||
) |
Receives a MIDI package from APP_NotifyReceivedEvent (-> app.c) if port matches with blm_midi_port
s32 BLM_SCALAR_MASTER_MIDI_TimeOut | ( | mios32_midi_port_t | port | ) |
This function is called from NOTIFY_MIDI_TimeOut() in app.c if the MIDI parser runs into timeout
Returns the number of colours as reported by the BLM during layout request
Returns the number of columns as reported by the BLM during layout request
Returns the number of columns as reported by the BLM during layout request
s32 BLM_SCALAR_MASTER_Periodic_mS | ( | void | ) |
This function should be periodically called each mS
handle Timeout
take over update force flag
send LED changes to BLM16x16
send LED changes to extra buttons
Sets a row offsets when sending the display data for smaller BLM screens
This function is called to request the layout
s32 BLM_SCALAR_MASTER_SYSEX_Parser | ( | mios32_midi_port_t | port, | |
u8 | midi_in | |||
) |
This function parses an incoming sysex stream for MIOS32 commands Called from SysEx hook in app.c
Directly sets the timeout counter, e.g. to 0 so that the BLM will be disabled until a newly selected port receives a connection request
u16 blm_scalar_master_leds_green[BLM_SCALAR_MASTER_NUM_ROWS] |
Global variables
u16 blm_scalar_master_leds_red[BLM_SCALAR_MASTER_NUM_ROWS] |