clockgen2 2.0.0.0
|
Functions | |
void | clockgen2_cfg_setup (clockgen2_cfg_t *cfg) |
Config Object Initialization function. | |
CLOCKGEN2_RETVAL | clockgen2_init (clockgen2_t *ctx, clockgen2_cfg_t *cfg) |
Initialization function. | |
void | clockgen2_generic_write (clockgen2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | clockgen2_generic_read (clockgen2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | clockgen2_set_dtr_pin (clockgen2_t *ctx, uint8_t state) |
Set dtr pin function. | |
void | clockgen2_set_pdn_pin (clockgen2_t *ctx, uint8_t state) |
Set pdn pin function. | |
void | clockgen2_set_oe_pin (clockgen2_t *ctx, uint8_t state) |
Set oe pin function. | |
void | clockgen2_write (clockgen2_t *ctx, uint8_t w_reg, uint8_t w_data) |
Writing 1B function. | |
void | clockgen2_set_prescaler (clockgen2_t *ctx, uint8_t val) |
Prescaler set function. | |
void | clockgen2_change_address (clockgen2_t *ctx, uint8_t new_addr) |
Prescaler set function. | |
void | clockgen2_store_config (clockgen2_t *ctx) |
Settings save function. | |
void | clockgen2_auto_setting_preserve (clockgen2_t *ctx, uint8_t state) |
Auto setting preservation function. | |
void | clockgen2_output_enable (clockgen2_t *ctx, uint8_t state) |
Settings save function. | |
void clockgen2_auto_setting_preserve | ( | clockgen2_t * | ctx, |
uint8_t | state ) |
Auto setting preservation function.
ctx | Click object. |
state | Value to comapre with Enable/Disable registers. |
@description Function used for enabling/disabling auto settings preservation.
void clockgen2_cfg_setup | ( | clockgen2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void clockgen2_change_address | ( | clockgen2_t * | ctx, |
uint8_t | new_addr ) |
Prescaler set function.
ctx | Click object. |
new_addr | New slave address. |
@description Function configures the clockgen2 slave address at runtime.
void clockgen2_generic_read | ( | clockgen2_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 clockgen2_generic_write | ( | clockgen2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
CLOCKGEN2_RETVAL clockgen2_init | ( | clockgen2_t * | ctx, |
clockgen2_cfg_t * | cfg ) |
Initialization function.
clockgen2 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void clockgen2_output_enable | ( | clockgen2_t * | ctx, |
uint8_t | state ) |
Settings save function.
ctx | Click object. |
state | Pin value. |
@description Function for enabling/disabling of the clock output.
void clockgen2_set_dtr_pin | ( | clockgen2_t * | ctx, |
uint8_t | state ) |
Set dtr pin function.
ctx | Click object. |
state | Pin state value. |
@description Set the state of the DTR pin.
void clockgen2_set_oe_pin | ( | clockgen2_t * | ctx, |
uint8_t | state ) |
Set oe pin function.
ctx | Click object. |
state | Pin state value. |
@description Set the state of the OE pin.
void clockgen2_set_pdn_pin | ( | clockgen2_t * | ctx, |
uint8_t | state ) |
Set pdn pin function.
ctx | Click object. |
state | Pin state value. |
@description Set the state of the PDN pin.
void clockgen2_set_prescaler | ( | clockgen2_t * | ctx, |
uint8_t | val ) |
Prescaler set function.
ctx | Click object. |
val | Write address. |
@description Function for setting the main clock prescaler.
void clockgen2_store_config | ( | clockgen2_t * | ctx | ) |
Settings save function.
ctx | Click object. |
@description Function used for saving the settings to the eeprom if the the auto preserve settings is disabled.
void clockgen2_write | ( | clockgen2_t * | ctx, |
uint8_t | w_reg, | ||
uint8_t | w_data ) |
Writing 1B function.
ctx | Click object. |
w_reg | Write address. |
w_data | Data to be written. |
@description Function for writing data to a specified register.