rtc7 2.0.0.0
|
Functions | |
void | rtc7_cfg_setup (rtc7_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | rtc7_init (rtc7_t *ctx, rtc7_cfg_t *cfg) |
Initialization function. | |
err_t | rtc7_generic_write (rtc7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
err_t | rtc7_generic_read (rtc7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
err_t | rtc7_write_reg (rtc7_t *ctx, uint8_t reg, uint8_t data_in) |
Write one byte function. | |
err_t | rtc7_read_reg (rtc7_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Read one byte function. | |
err_t | rtc7_init_time (rtc7_t *ctx, int8_t time_zone) |
Initialization function. | |
err_t | rtc7_set_osc (rtc7_t *ctx, uint8_t enable_osc, uint8_t clk_in, uint8_t clk_out) |
Oscillator Set function. | |
err_t | rtc7_set_timer (rtc7_t *ctx, uint8_t enable_timer, uint8_t timer_freq) |
Timer Set function. | |
err_t | rtc7_reset (rtc7_t *ctx) |
Reset function. | |
err_t | rtc7_get_gmt_time (rtc7_t *ctx, rtc7_time_t *gmt_time) |
Get Gmt Time function. | |
err_t | rtc7_get_local_time (rtc7_t *ctx, rtc7_time_t *local_time) |
Get Local Time function. | |
err_t | rtc7_set_gmt_time (rtc7_t *ctx, rtc7_time_t *time) |
Set Gmt Time function. | |
uint8_t | rtc7_check_interrupt (rtc7_t *ctx) |
Interrupt Check function. | |
uint8_t | rtc7_check_psw (rtc7_t *ctx) |
Power Switch Control function. | |
void rtc7_cfg_setup | ( | rtc7_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
uint8_t rtc7_check_interrupt | ( | rtc7_t * | ctx | ) |
Interrupt Check function.
ctx | Click object. |
This function returns the interrupt state, state of INTA pin.
uint8_t rtc7_check_psw | ( | rtc7_t * | ctx | ) |
Power Switch Control function.
ctx | Click object. |
This function checks the state of Power Switch Control output pin.
err_t rtc7_generic_read | ( | rtc7_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 |
This function reads data from the desired register.
err_t rtc7_generic_write | ( | rtc7_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. |
This function writes data to the desired register.
err_t rtc7_get_gmt_time | ( | rtc7_t * | ctx, |
rtc7_time_t * | gmt_time ) |
Get Gmt Time function.
ctx | Click object. |
gmt_time | Structure where time data be stored. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t rtc7_get_local_time | ( | rtc7_t * | ctx, |
rtc7_time_t * | local_time ) |
Get Local Time function.
ctx | Click object. |
local_time | Structure where local time data be stored. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t rtc7_init | ( | rtc7_t * | ctx, |
rtc7_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
err_t rtc7_init_time | ( | rtc7_t * | ctx, |
int8_t | time_zone ) |
Initialization function.
ctx | Click object. |
time_zone | Determines the local time zone (from 14 to -12). |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t rtc7_read_reg | ( | rtc7_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Read one byte function.
ctx | Click object. |
reg | Address which from data be read. |
data_out | Buffer where data be stored. |
len | Number of bytes to be read. |
This function writes one byte data to the register.
err_t rtc7_reset | ( | rtc7_t * | ctx | ) |
Reset function.
ctx | Click object. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t rtc7_set_gmt_time | ( | rtc7_t * | ctx, |
rtc7_time_t * | time ) |
Set Gmt Time function.
ctx | Click object. |
time | Structure which from time data be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t rtc7_set_osc | ( | rtc7_t * | ctx, |
uint8_t | enable_osc, | ||
uint8_t | clk_in, | ||
uint8_t | clk_out ) |
Oscillator Set function.
ctx | Click object. |
enable_osc | 0x00 - enable osc, 0x08 - disable osc. |
clk_in | Determines the input frequency. |
clk_out | Determines the output frequency. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t rtc7_set_timer | ( | rtc7_t * | ctx, |
uint8_t | enable_timer, | ||
uint8_t | timer_freq ) |
Timer Set function.
ctx | Click object. |
enable_timer | 0x00 - disable timer, 0x10 - enable timer. |
timer_freq | Determines the timer frequency. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.err_t rtc7_write_reg | ( | rtc7_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
Write one byte function.
ctx | Click object. |
reg | Address where data be written. |
data_in | Data to be written. |
This function writes one byte data to the register.