BLM
Detailed Description
Button/Single/Duo/Triple (RGB)-LED driver
Function Documentation
s32 BLM_ButtonHandler |
( |
void * |
_notify_hook |
) |
|
This function should be called from a task to check for button changes periodically. Events (change from 0->1 or from 1->0) will be notified via the given callback function <notify_hook> with following parameters: <notifcation-hook>(s32 pin, s32 value)
- Returns:
- < 0 on errors
Returns current BLM configuration
- Returns:
- config structure see BLM_ConfigSet()
Configures the BLM driver.
See blm.h for more informations
- Parameters:
-
[in] | config | a structure with following members:
-
config.dout_l1_sr (LED anodes, left side)
-
config.dout_r1_sr (LED anodes, right side)
-
config.dout_cathodes_sr1 (LED cathodes and button selection lines (2 * 4 bit))
-
config.dout_cathodes_sr2 (optional second SR which outputs the same values)
-
config.cathodes_inv_mask (inversion mask for cathodes)
-
config.dout_l2_sr (for 2-colour LED option)
-
config.dout_r2_sr (for 2-colour LED option)
-
config.dout_l3_sr (for 3-colour LED option)
-
config.dout_r3_sr (for 3-colour LED option)
-
config.debounce_delay (used if debounce mode >= 1)
|
- Returns:
- < 0 if initialisation failed
s32 BLM_DIN_PinGet |
( |
u32 |
pin |
) |
|
Returns value of BLM DIN pin
- Parameters:
-
- Returns:
- pin value (0 or 1)
-
< 0 if pin not available
u8 BLM_DIN_SRGet |
( |
u32 |
sr |
) |
|
Returns value of BLM DIN "virtual" shift register
- Parameters:
-
[in] | sr | number of shift register |
- Returns:
- < 0 if pin not available
Returns red/green/blue LED status
- Parameters:
-
[in] | colour | the colour selection (0/1/2) |
[in] | pin | the pin number |
- Returns:
- < 0 if pin not available
Sets red/green/blue LED to 0 or Vss
- Parameters:
-
[in] | colour | the colour selection (0/1/2) |
[in] | pin | the pin number |
[in] | value | the pin value |
- Returns:
- < 0 if pin not available
u8 BLM_DOUT_SRGet |
( |
u32 |
colour, |
|
|
u32 |
sr | |
|
) |
| | |
Returns content of red or green "virtual" shift register
- Parameters:
-
[in] | colour | the colour selection (0/1/2) |
[in] | sr | the shift register number |
- Returns:
- < 0 if SR not available
Sets red or green "virtual" shift register
- Parameters:
-
[in] | colour | the colour selection (0/1/2) |
[in] | sr | the shift register number |
[in] | value | the shift register value |
- Returns:
- < 0 if SR not available
This function gets the DIN values of the selected column.
It should be called from the APP_SRIO_ServiceFinish() hook
- Returns:
- < 0 on errors
Initializes the button LED matrix Should be called from Init() during startup
- Parameters:
-
[in] | mode | currently only mode 0 supported |
- Returns:
- < 0 if initialisation failed
s32 BLM_PrepareCol |
( |
void |
|
) |
|
This function prepares the DOUT register to drive a column.
It should be called from the APP_SRIO_ServicePrepare()
- Returns:
- < 0 on errors
Variable Documentation