MLC interface driver
|
Macros | |
#define | DAC_CH_A 0 |
#define | DAC_CH_B 1 |
#define | DAC_CH_C 2 |
#define | DAC_CH_D 3 |
#define | DAC_CH_E 4 |
#define | DAC_CH_F 5 |
#define | DAC_CH_G 6 |
#define | DAC_CH_H 7 |
#define | dac_reset() MLC_DAC_reset() |
#define | dac_control MLC_DAC_control |
#define | dac_write MLC_DAC_write |
#define | write_dac MLC_DAC_write |
#define | dac_init() MLC_DAC_init() |
#define | dac_sel_channel dac_sel_ch |
#define | dac_variables dac_values |
Functions | |
void | MLC_DAC_reset (void) |
void | MLC_DAC_control (uint16_t cmd) |
void | MLC_DAC_write (uint16_t count) |
void | MLC_DAC_init (void) |
Variables | |
uint16_t | dac_values [8] |
uint16_t | dac_sel_ch [8] |
#define DAC_CH_A 0 |
Constant for access channel A of DAC.
Definition at line 722 of file MLC_drv.h.
Referenced by MLC_DAC_init().
#define DAC_CH_B 1 |
Constant for access channel B of DAC.
Definition at line 723 of file MLC_drv.h.
Referenced by MLC_DAC_init().
#define DAC_CH_C 2 |
Constant for access channel C of DAC.
Definition at line 724 of file MLC_drv.h.
Referenced by MLC_DAC_init().
#define DAC_CH_D 3 |
Constant for access channel D of DAC.
Definition at line 725 of file MLC_drv.h.
Referenced by MLC_DAC_init().
#define DAC_CH_E 4 |
Constant for access channel E of DAC.
Definition at line 726 of file MLC_drv.h.
Referenced by MLC_DAC_init().
#define DAC_CH_F 5 |
Constant for access channel F of DAC.
Definition at line 727 of file MLC_drv.h.
Referenced by MLC_DAC_init().
#define DAC_CH_G 6 |
Constant for access channel G of DAC.
Definition at line 728 of file MLC_drv.h.
Referenced by MLC_DAC_init().
#define DAC_CH_H 7 |
Constant for access channel H of DAC.
Definition at line 729 of file MLC_drv.h.
Referenced by MLC_DAC_init().
#define dac_control MLC_DAC_control |
#define dac_init | ( | ) | MLC_DAC_init() |
#define dac_reset | ( | ) | MLC_DAC_reset() |
#define dac_sel_channel dac_sel_ch |
#define dac_variables dac_values |
#define dac_write MLC_DAC_write |
#define write_dac MLC_DAC_write |
void MLC_DAC_control | ( | uint16_t | cmd | ) |
void MLC_DAC_init | ( | void | ) |
Initializes DAC, setup it according to flags DAC_USE_x. It also set array of channels to default state, where value with index 0 will be send to DAC_CH_A etc. This means, that we do not need to write dac_sel_ch array.
Definition at line 1428 of file MLC_drv.c.
References DAC_CH_A, DAC_CH_B, DAC_CH_C, DAC_CH_D, DAC_CH_E, DAC_CH_F, DAC_CH_G, DAC_CH_H, dac_sel_ch, and MLC_DAC_reset().
void MLC_DAC_reset | ( | void | ) |
Reset DAC, this must be called before any access to DAC.
Definition at line 1506 of file MLC_drv.c.
References DELAY_US().
Referenced by MLC_DAC_init().
void MLC_DAC_write | ( | uint16_t | count | ) |
Function to send data from buffer to DAC. It can be defined how many values we need to write out.
count | number in range <0,7>. It then send values from dac_values to channel defined in dac_sel_ch from 0 to count. I.e. count = 4 sends values from 0 to 4. |
Definition at line 1551 of file MLC_drv.c.
References dac_sel_ch, and dac_values.
uint16_t dac_sel_ch[8] |
Array which maps values from dac_values array to DAC outputs
Definition at line 115 of file MLC_drv.c.
Referenced by MLC_DAC_init(), and MLC_DAC_write().
uint16_t dac_values[8] |
Array which stores values to send to channel defined in dac_sel_ch
Definition at line 114 of file MLC_drv.c.
Referenced by MLC_DAC_write().