# modules/blm_scalar_master/blm_scalar_master.h File Reference

`#include <mios32_config.h>`

## Defines
#define | BLM_SCALAR_MASTER_NUM_ROWS 16
#define | BLM_SCALAR_MASTER_NUM_COLUMNS 16
#define | BLM_SCALAR_MASTER_OSC_SUPPORT 0
#define | BLM_SCALAR_MASTER_MUTEX_MIDIOUT_TAKE { }
#define | BLM_SCALAR_MASTER_MUTEX_MIDIOUT_GIVE { }
## Enumerations
enum | blm_scalar_master_connection_state_t { BLM_SCALAR_MASTER_CONNECTION_STATE_IDLE = 0, BLM_SCALAR_MASTER_CONNECTION_STATE_SYSEX, BLM_SCALAR_MASTER_CONNECTION_STATE_LEMUR }
enum | blm_scalar_master_element_t { BLM_SCALAR_MASTER_ELEMENT_GRID = 0, BLM_SCALAR_MASTER_ELEMENT_EXTRA_ROW, BLM_SCALAR_MASTER_ELEMENT_EXTRA_COLUMN, BLM_SCALAR_MASTER_ELEMENT_SHIFT }
enum | blm_scalar_master_colour_t { BLM_SCALAR_MASTER_COLOUR_OFF = 0, BLM_SCALAR_MASTER_COLOUR_GREEN = 1, BLM_SCALAR_MASTER_COLOUR_RED = 2, BLM_SCALAR_MASTER_COLOUR_YELLOW = 3 }
## Functions
s32 | BLM_SCALAR_MASTER_Init (u32 mode)
s32 | BLM_SCALAR_MASTER_MIDI_PortSet (u8 blm, mios32_midi_port_t port)
mios32_midi_port_t | BLM_SCALAR_MASTER_MIDI_PortGet (u8 blm)
blm_scalar_master_connection_state_t | BLM_SCALAR_MASTER_ConnectionStateGet (u8 blm)
s32 | BLM_SCALAR_MASTER_ButtonCallback_Init (s32(*button_callback_func)(u8 blm, blm_scalar_master_element_t element_id, u8 button_x, u8 button_y, u8 button_depressed))
s32 | BLM_SCALAR_MASTER_FaderCallback_Init (s32(*fader_callback_func)(u8 blm, u8 fader, u8 value))
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)
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)
s32 | BLM_SCALAR_MASTER_RotateViewSet (u8 blm, u8 rotate_view)
s32 | BLM_SCALAR_MASTER_RotateViewGet (u8 blm)
s32 | BLM_SCALAR_MASTER_RowOffsetSet (u8 blm, u8 row_offset)
s32 | BLM_SCALAR_MASTER_RowOffsetGet (u8 blm)
s32 | BLM_SCALAR_MASTER_NumColumnsGet (u8 blm)
s32 | BLM_SCALAR_MASTER_NumRowsGet (u8 blm)
s32 | BLM_SCALAR_MASTER_NumColoursGet (u8 blm)
s32 | BLM_SCALAR_MASTER_TimeoutCtrSet (u8 blm, u16 ctr)
s32 | BLM_SCALAR_MASTER_TimeoutCtrGet (u8 blm)
s32 | BLM_SCALAR_MASTER_ForceDisplayUpdate (u8 blm)
s32 | BLM_SCALAR_MASTER_SendRequest (u8 blm, u8 req)
s32 | BLM_SCALAR_MASTER_MIDI_Receive (mios32_midi_port_t port, mios32_midi_package_t midi_package)
s32 | BLM_SCALAR_MASTER_SYSEX_Parser (mios32_midi_port_t port, u8 midi_in)
s32 | BLM_SCALAR_MASTER_MIDI_TimeOut (mios32_midi_port_t port)
s32 | BLM_SCALAR_MASTER_Periodic_mS (void)
## Variables
u16 | blm_scalar_master_leds_green [BLM_SCALAR_MASTER_NUM_ROWS]
u16 | blm_scalar_master_leds_red [BLM_SCALAR_MASTER_NUM_ROWS]
u16 | blm_scalar_master_leds_extracolumn_green
u16 | blm_scalar_master_leds_extracolumn_red
u16 | blm_scalar_master_leds_extracolumn_shift_green
u16 | blm_scalar_master_leds_extracolumn_shift_red
u16 | blm_scalar_master_leds_extrarow_green
u16 | blm_scalar_master_leds_extrarow_red
u8 | blm_scalar_master_leds_extra_green
u8 | blm_scalar_master_leds_extra_red

## Define Documentation

#define BLM_SCALAR_MASTER_MUTEX_MIDIOUT_GIVE { }

#define BLM_SCALAR_MASTER_MUTEX_MIDIOUT_TAKE { }

#define BLM_SCALAR_MASTER_NUM_COLUMNS 16

#define BLM_SCALAR_MASTER_NUM_ROWS 16

#define BLM_SCALAR_MASTER_OSC_SUPPORT 0

## Enumeration Type Documentation

enum blm_scalar_master_colour_t

Enumerator:

  BLM_SCALAR_MASTER_COLOUR_OFF |
  BLM_SCALAR_MASTER_COLOUR_GREEN |
  BLM_SCALAR_MASTER_COLOUR_RED |
  BLM_SCALAR_MASTER_COLOUR_YELLOW |

enum blm_scalar_master_connection_state_t

Enumerator:

  BLM_SCALAR_MASTER_CONNECTION_STATE_IDLE |
  BLM_SCALAR_MASTER_CONNECTION_STATE_SYSEX |
  BLM_SCALAR_MASTER_CONNECTION_STATE_LEMUR |

enum blm_scalar_master_element_t

Enumerator:

  BLM_SCALAR_MASTER_ELEMENT_GRID |
  BLM_SCALAR_MASTER_ELEMENT_EXTRA_ROW |
  BLM_SCALAR_MASTER_ELEMENT_EXTRA_COLUMN |
  BLM_SCALAR_MASTER_ELEMENT_SHIFT |

## Variable Documentation

u8 blm_scalar_master_leds_extra_green

u8 blm_scalar_master_leds_extra_red

u16 blm_scalar_master_leds_extracolumn_green

u16 blm_scalar_master_leds_extracolumn_red

u16 blm_scalar_master_leds_extracolumn_shift_green

u16 blm_scalar_master_leds_extracolumn_shift_red

u16 blm_scalar_master_leds_extrarow_green

u16 blm_scalar_master_leds_extrarow_red

u16 blm_scalar_master_leds_green[BLM_SCALAR_MASTER_NUM_ROWS]

u16 blm_scalar_master_leds_red[BLM_SCALAR_MASTER_NUM_ROWS]