clockgen3 2.0.0.0
|
Functions | |
void | clockgen3_cfg_setup (clockgen3_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | clockgen3_init (clockgen3_t *ctx, clockgen3_cfg_t *cfg) |
Initialization function. | |
void | clockgen3_config (clockgen3_t *ctx, uint8_t cfg) |
Configuration. | |
void | clockgen3_set_cs_pin (clockgen3_t *ctx, uint8_t state) |
Sets CS pin state. | |
void | clockgen3_generic_write (clockgen3_t *ctx, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | clockgen3_generic_read (clockgen3_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | clockgen3_set_freq (clockgen3_t *ctx, float freq) |
Sets Frequency. | |
void clockgen3_cfg_setup | ( | clockgen3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void clockgen3_config | ( | clockgen3_t * | ctx, |
uint8_t | cfg ) |
Configuration.
ctx | Click object. |
cfg | Configuration |
CLOCKGEN3_CFG_ON_CLK_180, CLOCKGEN3_CFG_OFF_ON, CLOCKGEN3_CFG_ON_OFF, CLOCKGEN3_CFG_POWER_DOWN
void clockgen3_generic_read | ( | clockgen3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void clockgen3_generic_write | ( | clockgen3_t * | ctx, |
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
err_t clockgen3_init | ( | clockgen3_t * | ctx, |
clockgen3_cfg_t * | cfg ) |
Initialization function.
clockgen3 | Click object. |
cfg | Click configuration structure. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. @description This function initializes all necessary pins and peripherals used for this click. void clockgen3_set_cs_pin | ( | clockgen3_t * | ctx, |
uint8_t | state ) |
Sets CS pin state.
ctx | Click object. |
state | CS pin state |
void clockgen3_set_freq | ( | clockgen3_t * | ctx, |
float | freq ) |
Sets Frequency.
ctx | Click object. |
freq | Frequency in KHz ( 1.039 KHz to 68.03 MHz ) |