Sensorian
1.0
C API Reference Guide Library
|
Functions | |
void | MCP79410_Initialize (void) |
Initializes the RTCC with the system time. More... | |
void | MCP79410_EnableOscillator (void) |
Enables the clock oscillator. This must be enabled in order for the RTCC to run. More... | |
void | MCP79410_DisableOscillator (void) |
Disables the clock oscillator.The RTCC does not operate once the oscillator is stopped. More... | |
unsigned char | MCP79410_IsRunning (void) |
Checks if the chip clock is running. More... | |
RTCC_Struct * | MCP79410_GetTime (void) |
The function returns a time structure with the current time from the RTCC. More... | |
void | MCP79410_SetTime (RTCC_Struct *time) |
This function initializes the RTCC with a specific time contained in the time structure. More... | |
void | MCP79410_SetHourFormat (Format_t format) |
This function sets the hour format. More... | |
void | MCP79410_SetPMAM (PMAM_t meridian) |
This function sets the meridian mode. More... | |
void | MCP79410_EnableAlarm (Alarm_t alarm) |
This function sets the alarm time. More... | |
void | MCP79410_DisableAlarm (Alarm_t alarm) |
This function disables one of the two alarms. More... | |
AlarmStatus_t | MCP79410_GetAlarmStatus (Alarm_t alarm) |
This function gets the status of the alarm interrupt flag. More... | |
void | MCP79410_ClearInterruptFlag (Alarm_t alarm) |
Clears the interrupt alarm flag. More... | |
void | MCP79410_SetAlarmTime (RTCC_Struct *time, Alarm_t alarm) |
This function sets the alarm time for one of the two alarms. More... | |
void | MCP79410_SetAlarmMFPPolarity (Polarity_t MFP_pol, Alarm_t alarm) |
This function sets the MFP polarity either high or low. More... | |
void | MCP79410_SetAlarmMatch (Match_t match, Alarm_t alarm) |
Alarm Asserts on Match on seconds, minutes ,hours depending on match parameter. More... | |
void | MCP79410_SetMFP_Functionality (MFP_t mode) |
This function sets the MFP pin mode. More... | |
void | MCP79410_SetMFP_GPOStatus (Polarity_t status) |
This function sets the MFP output logic level when the pin is configured as GPO. More... | |
unsigned char | MCP79410_CheckPowerFailure (void) |
This function checks if there was a power failure. More... | |
unsigned char | MCP79410_IsVbatEnabled (void) |
This function checks if battery mode is enabled. More... | |
void | MCP79410_EnableVbat (void) |
This function enables backup battery mode. More... | |
void | MCP79410_DisableVbat (void) |
This function disables the backup battery functionality. More... | |
RTCC_Struct * | MCP79410_GetPowerUpTime (void) |
This function returns the power-up time of the RTCC. More... | |
RTCC_Struct * | MCP79410_GetPowerDownTime (void) |
This function returns the power-down time of the RTCC. More... | |
unsigned char | MCP79410_dec2bcd (unsigned char num) |
Convert Binary Coded Decimal (BCD) to Decimal. More... | |
unsigned char | MCP79410_bcd2dec (unsigned char num) |
Convert Binary Coded Decimal (BCD) to Decimal. More... | |
These functions allow the user to leverage the RTCC time keeping capabilities and alarm settings.
unsigned char MCP79410_bcd2dec | ( | unsigned char | num | ) |
Convert Binary Coded Decimal (BCD) to Decimal.
num | Number to be converted to decimal |
Definition at line 570 of file MCP79410.c.
unsigned char MCP79410_CheckPowerFailure | ( | void | ) |
This function checks if there was a power failure.
Definition at line 465 of file MCP79410.c.
void MCP79410_ClearInterruptFlag | ( | Alarm_t | alarm | ) |
Clears the interrupt alarm flag.
alarm | Selects which alarm Interrupt flag should be cleared |
Definition at line 276 of file MCP79410.c.
unsigned char MCP79410_dec2bcd | ( | unsigned char | num | ) |
Convert Binary Coded Decimal (BCD) to Decimal.
num | Number to be converted to BCD |
Definition at line 560 of file MCP79410.c.
void MCP79410_DisableAlarm | ( | Alarm_t | alarm | ) |
This function disables one of the two alarms.
alarm | Disables one of the two alarms. |
Definition at line 240 of file MCP79410.c.
void MCP79410_DisableOscillator | ( | void | ) |
Disables the clock oscillator.The RTCC does not operate once the oscillator is stopped.
Definition at line 73 of file MCP79410.c.
void MCP79410_DisableVbat | ( | void | ) |
This function disables the backup battery functionality.
Definition at line 515 of file MCP79410.c.
void MCP79410_EnableAlarm | ( | Alarm_t | alarm | ) |
This function sets the alarm time.
alarm | Enables one of the two alarms. |
Definition at line 222 of file MCP79410.c.
void MCP79410_EnableOscillator | ( | void | ) |
Enables the clock oscillator. This must be enabled in order for the RTCC to run.
Definition at line 62 of file MCP79410.c.
void MCP79410_EnableVbat | ( | void | ) |
AlarmStatus_t MCP79410_GetAlarmStatus | ( | Alarm_t | alarm | ) |
This function gets the status of the alarm interrupt flag.
alarm | One of the two alarms, ZERO or ONE. |
Definition at line 258 of file MCP79410.c.
RTCC_Struct * MCP79410_GetPowerDownTime | ( | void | ) |
This function returns the power-down time of the RTCC.
Definition at line 543 of file MCP79410.c.
RTCC_Struct * MCP79410_GetPowerUpTime | ( | void | ) |
This function returns the power-up time of the RTCC.
Definition at line 527 of file MCP79410.c.
RTCC_Struct * MCP79410_GetTime | ( | void | ) |
The function returns a time structure with the current time from the RTCC.
Definition at line 100 of file MCP79410.c.
void MCP79410_Initialize | ( | void | ) |
unsigned char MCP79410_IsRunning | ( | void | ) |
Checks if the chip clock is running.
Definition at line 84 of file MCP79410.c.
unsigned char MCP79410_IsVbatEnabled | ( | void | ) |
This function checks if battery mode is enabled.
Definition at line 486 of file MCP79410.c.
Alarm Asserts on Match on seconds, minutes ,hours depending on match parameter.
match | Match setting |
alarm | Select either alarm ZERO or ONE |
Definition at line 364 of file MCP79410.c.
void MCP79410_SetAlarmMFPPolarity | ( | Polarity_t | MFP_pol, |
Alarm_t | alarm | ||
) |
This function sets the MFP polarity either high or low.
MFP_pol | polarity of MFP pin , Asserted output state of MFP is a logic low level for LOW and opposite for HIGH |
alarm | One of the two alarms, either alarm ZERO or ONE. |
Definition at line 331 of file MCP79410.c.
void MCP79410_SetAlarmTime | ( | RTCC_Struct * | time, |
Alarm_t | alarm | ||
) |
This function sets the alarm time for one of the two alarms.
*time | Pointer of type RTCC_Struct encapsulating time settings. |
alarm | One of the two alarms,either alarm ZERO or ONE. |
Definition at line 297 of file MCP79410.c.
void MCP79410_SetHourFormat | ( | Format_t | format | ) |
This function sets the hour format.
format | Type of format is Format_t. |
Definition at line 184 of file MCP79410.c.
void MCP79410_SetMFP_Functionality | ( | MFP_t | mode | ) |
This function sets the MFP pin mode.
mode | Mode of the MFP pin. |
Definition at line 414 of file MCP79410.c.
void MCP79410_SetMFP_GPOStatus | ( | Polarity_t | status | ) |
This function sets the MFP output logic level when the pin is configured as GPO.
status | Polarity of MFP pin , Asserted output state of MFP is a logic low level for LOW and opposite for HIGH |
Definition at line 447 of file MCP79410.c.
void MCP79410_SetPMAM | ( | PMAM_t | meridian | ) |
This function sets the meridian mode.
meridian | Set either PM or AM settings. |
Definition at line 203 of file MCP79410.c.
void MCP79410_SetTime | ( | RTCC_Struct * | time | ) |
This function initializes the RTCC with a specific time contained in the time structure.
time | RTCC struct that contains the time to be set |
Definition at line 125 of file MCP79410.c.