![]() |
ATxmega Core
|
#include <avr/io.h>
Go to the source code of this file.
Data Structures | |
struct | timestamp_t |
Macros | |
#define | bool uint8_t |
#define | true 1 |
#define | false 0 |
Functions | |
void | core_callback_define_clock_default (void) |
Used to define the clock direction default of the device. | |
void | core_callback_initialize_hardware (void) |
void | core_callback_reset_registers (void) |
void | core_callback_registers_were_reinitialized (void) |
void | core_callback_visualen_to_on (void) |
Called when the application must turn off all the visual indicators. | |
void | core_callback_visualen_to_off (void) |
Called when the application can turn on the visual indicators. | |
void | core_callback_device_to_standby (void) |
When the device goes to Standby Mode. | |
void | core_callback_device_to_active (void) |
When the device goes to Active Mode. | |
void | core_callback_device_to_speed (void) |
When the device goes to Speed Mode. | |
void | core_callback_t_before_exec (void) |
Called before execute the timer interrupts. | |
void | core_callback_t_after_exec (void) |
Called after execute the timer interrupts. | |
void | core_callback_t_1ms (void) |
Called every millisecond. | |
void | core_callback_t_500us (void) |
Called 500 microseconds after the "void core_callback_t_1ms(void)". | |
void | core_callback_t_new_second (void) |
Called every time a new second starts. | |
bool | core_read_app_register (uint8_t add, uint8_t type) |
Read from an application register. | |
bool | core_write_app_register (uint8_t add, uint8_t type, uint8_t *content, uint16_t n_elements) |
Write to an application register. | |
bool | hwbp_read_common_reg (uint8_t add, uint8_t type) |
Read from a common register. | |
bool | hwbp_write_common_reg (uint8_t add, uint8_t type, uint8_t *content, uint16_t n_elements) |
Write to an common register. | |
bool | hwbp_write_common_reg_RESET_APP (void *a) |
Write to common register RESET_APP. | |
bool | core_save_all_registers_to_eeprom (void) |
Used to save all registers to non-volatile memory. | |
bool | hwbp_write_common_reg_CONFIG (void *a) |
Write to common register CONFIG. | |
void | hwbp_read_common_reg_CONFIG (void) |
Read from common register CONFIG. | |
void | core_callback_clock_to_repeater (void) |
Called when the application should configure the hardware to repeat the harp timestamp clock input. | |
void | core_callback_clock_to_generator (void) |
Called when the application should configure the hardware to generate the harp timestamp clock. | |
void | core_callback_clock_to_unlock (void) |
Called when the timestamp lock is changed to unlocked. | |
void | core_callback_clock_to_lock (void) |
Called when the timestamp lock is changed to locked. | |
bool | core_bool_device_is_repeater (void) |
Used to know if the device is repeating the harp timestamp clock. | |
bool | core_bool_device_is_generator (void) |
Used to know if the device is generating the harp timestamp clock. | |
bool | core_bool_clock_is_locked (void) |
Used to check if the timestamp register is locked. | |
bool | core_device_to_clock_repeater (void) |
Used to set the device as a repeater. | |
bool | core_device_to_clock_generator (void) |
Used to set the device as a generator. | |
bool | core_clock_to_lock (void) |
Used to lock the timestamp register. | |
bool | core_clock_to_unlock (void) |
Used to unlock the timestamp register. | |
void | core_func_start_core (const uint16_t who_am_i, const uint8_t hwH, const uint8_t hwL, const uint8_t fwH, const uint8_t fwL, const uint8_t assembly, uint8_t *pointer_to_app_regs, const uint16_t app_mem_size_to_save, const uint8_t num_of_app_registers, const uint8_t *device_name, const bool device_is_able_to_repeat_clock, const bool device_is_able_to_generate_clock, const uint8_t default_timestamp_offset) |
It is mandatory that this function is the first of the application code. | |
void | core_func_catastrophic_error_detected (void) |
void | core_callback_catastrophic_error_detected (void) |
void | core_func_leave_speed_mode_and_go_to_standby_mode (void) |
Used to leave the speed mode. | |
void | core_func_update_user_timestamp (uint32_t seconds, uint16_t useconds) |
Used to create a specific timestamp that can be used when sending Events. | |
void | core_func_read_user_timestamp (uint32_t *seconds, uint16_t *useconds) |
Used to read the current user timestamps. | |
void | core_func_mark_user_timestamp (void) |
Used to save the current timestamp. | |
void | core_func_send_event (uint8_t add, bool use_core_timestamp) |
Used to send an Event. | |
uint32_t | core_func_read_R_TIMESTAMP_SECOND (void) |
Used to get the content of register R_TIMESTAMP_SECOND. | |
uint16_t | core_func_read_R_TIMESTAMP_MICRO (void) |
Used to get the content of register R_TIMESTAMP_MICRO. | |
bool | core_bool_is_visual_enabled (void) |
Return "true" if the LEDs can be ON. | |
bool | core_bool_speed_mode_is_in_use (void) |
Return "true" if the device is in Speed Mode. | |
bool | core_bool_device_is_active (void) |
Return "true" if the device is in Active Mode. | |
bool | core_bool_device_is_synchronized (void) |
Return "true" if the device is synchronized. | |
#define bool uint8_t |
#define false 0 |
#define true 1 |
bool core_bool_clock_is_locked | ( | void | ) |
Used to check if the timestamp register is locked.
bool core_bool_device_is_active | ( | void | ) |
Return "true" if the device is in Active Mode.
bool core_bool_device_is_generator | ( | void | ) |
Used to know if the device is generating the harp timestamp clock.
bool core_bool_device_is_repeater | ( | void | ) |
Used to know if the device is repeating the harp timestamp clock.
bool core_bool_device_is_synchronized | ( | void | ) |
Return "true" if the device is synchronized.
bool core_bool_is_visual_enabled | ( | void | ) |
Return "true" if the LEDs can be ON.
bool core_bool_speed_mode_is_in_use | ( | void | ) |
Return "true" if the device is in Speed Mode.
void core_callback_catastrophic_error_detected | ( | void | ) |
When a catastrophic error is detected (last callback before go into error state) User should shutdown all the peripherals
void core_callback_clock_to_generator | ( | void | ) |
Called when the application should configure the hardware to generate the harp timestamp clock.
void core_callback_clock_to_lock | ( | void | ) |
Called when the timestamp lock is changed to locked.
void core_callback_clock_to_repeater | ( | void | ) |
Called when the application should configure the hardware to repeat the harp timestamp clock input.
void core_callback_clock_to_unlock | ( | void | ) |
Called when the timestamp lock is changed to unlocked.
void core_callback_define_clock_default | ( | void | ) |
Used to define the clock direction default of the device.
void core_callback_device_to_active | ( | void | ) |
When the device goes to Active Mode.
void core_callback_device_to_speed | ( | void | ) |
When the device goes to Speed Mode.
void core_callback_device_to_standby | ( | void | ) |
When the device goes to Standby Mode.
void core_callback_initialize_hardware | ( | void | ) |
It's the first callback used, right after booting the core. The pins, ports and external hardware should be initialized.
void core_callback_registers_were_reinitialized | ( | void | ) |
Call right after load the register with default or EEPROM values. The state registers and external hardware should be configured according the value of the registers.
void core_callback_reset_registers | ( | void | ) |
Used to initialize the registers. All registers should be written to their default state.
void core_callback_t_1ms | ( | void | ) |
Called every millisecond.
void core_callback_t_500us | ( | void | ) |
Called 500 microseconds after the "void core_callback_t_1ms(void)".
void core_callback_t_after_exec | ( | void | ) |
Called after execute the timer interrupts.
void core_callback_t_before_exec | ( | void | ) |
Called before execute the timer interrupts.
void core_callback_t_new_second | ( | void | ) |
Called every time a new second starts.
void core_callback_visualen_to_off | ( | void | ) |
Called when the application can turn on the visual indicators.
void core_callback_visualen_to_on | ( | void | ) |
Called when the application must turn off all the visual indicators.
bool core_clock_to_lock | ( | void | ) |
Used to lock the timestamp register.
bool core_clock_to_unlock | ( | void | ) |
Used to unlock the timestamp register.
bool core_device_to_clock_generator | ( | void | ) |
Used to set the device as a generator.
bool core_device_to_clock_repeater | ( | void | ) |
Used to set the device as a repeater.
void core_func_catastrophic_error_detected | ( | void | ) |
Call this function in case of error A power up or reset must be performed to remove the device from this state
void core_func_leave_speed_mode_and_go_to_standby_mode | ( | void | ) |
Used to leave the speed mode.
void core_func_mark_user_timestamp | ( | void | ) |
Used to save the current timestamp.
uint16_t core_func_read_R_TIMESTAMP_MICRO | ( | void | ) |
Used to get the content of register R_TIMESTAMP_MICRO.
uint32_t core_func_read_R_TIMESTAMP_SECOND | ( | void | ) |
Used to get the content of register R_TIMESTAMP_SECOND.
void core_func_read_user_timestamp | ( | uint32_t * | seconds, |
uint16_t * | useconds ) |
Used to read the current user timestamps.
void core_func_send_event | ( | uint8_t | add, |
bool | use_core_timestamp ) |
Used to send an Event.
void core_func_start_core | ( | const uint16_t | who_am_i, |
const uint8_t | hwH, | ||
const uint8_t | hwL, | ||
const uint8_t | fwH, | ||
const uint8_t | fwL, | ||
const uint8_t | assembly, | ||
uint8_t * | pointer_to_app_regs, | ||
const uint16_t | app_mem_size_to_save, | ||
const uint8_t | num_of_app_registers, | ||
const uint8_t * | device_name, | ||
const bool | device_is_able_to_repeat_clock, | ||
const bool | device_is_able_to_generate_clock, | ||
const uint8_t | default_timestamp_offset ) |
It is mandatory that this function is the first of the application code.
void core_func_update_user_timestamp | ( | uint32_t | seconds, |
uint16_t | useconds ) |
Used to create a specific timestamp that can be used when sending Events.
bool core_read_app_register | ( | uint8_t | add, |
uint8_t | type ) |
Read from an application register.
bool core_save_all_registers_to_eeprom | ( | void | ) |
Used to save all registers to non-volatile memory.
bool core_write_app_register | ( | uint8_t | add, |
uint8_t | type, | ||
uint8_t * | content, | ||
uint16_t | n_elements ) |
Write to an application register.
bool hwbp_read_common_reg | ( | uint8_t | add, |
uint8_t | type ) |
Read from a common register.
void hwbp_read_common_reg_CONFIG | ( | void | ) |
Read from common register CONFIG.
bool hwbp_write_common_reg | ( | uint8_t | add, |
uint8_t | type, | ||
uint8_t * | content, | ||
uint16_t | n_elements ) |
Write to an common register.
bool hwbp_write_common_reg_CONFIG | ( | void * | a | ) |
Write to common register CONFIG.
bool hwbp_write_common_reg_RESET_APP | ( | void * | a | ) |
Write to common register RESET_APP.