9.1.4.1 Usage Code
We can get the calendar value by:
calendar = ast_read_calendar_value(AST);
Or we can get the counter value by: ast_counter = ast_read_counter_value(AST);
We can set the alarm interrupt by:
And we can set the periodic interrupt by:* ast_write_alarm0_value(AST, calendar.field + 1);* ast_set_callback(AST, ast_interrupt_alarm, ast_alarm_callback,* AST_ALARM_IRQn, 1);
* ast_write_periodic0_value(AST, AST_PSEL_32KHZ_1HZ - 4);* ast_set_callback(AST, ast_interrupt_per, ast_per_callback,* AST_PER_IRQn, 1);
