ATxmega Core
Loading...
Searching...
No Matches
hwbp_core.h File Reference
#include <avr/io.h>
Include dependency graph for hwbp_core.h:
This graph shows which files directly or indirectly include this file:

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.
 

Macro Definition Documentation

◆ bool

#define bool   uint8_t

◆ false

#define false   0

◆ true

#define true   1

Function Documentation

◆ core_bool_clock_is_locked()

bool core_bool_clock_is_locked ( void )

Used to check if the timestamp register is locked.

◆ core_bool_device_is_active()

bool core_bool_device_is_active ( void )

Return "true" if the device is in Active Mode.

◆ core_bool_device_is_generator()

bool core_bool_device_is_generator ( void )

Used to know if the device is generating the harp timestamp clock.

◆ core_bool_device_is_repeater()

bool core_bool_device_is_repeater ( void )

Used to know if the device is repeating the harp timestamp clock.

◆ core_bool_device_is_synchronized()

bool core_bool_device_is_synchronized ( void )

Return "true" if the device is synchronized.

◆ core_bool_is_visual_enabled()

bool core_bool_is_visual_enabled ( void )

Return "true" if the LEDs can be ON.

◆ core_bool_speed_mode_is_in_use()

bool core_bool_speed_mode_is_in_use ( void )

Return "true" if the device is in Speed Mode.

◆ core_callback_catastrophic_error_detected()

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

◆ core_callback_clock_to_generator()

void core_callback_clock_to_generator ( void )

Called when the application should configure the hardware to generate the harp timestamp clock.

◆ core_callback_clock_to_lock()

void core_callback_clock_to_lock ( void )

Called when the timestamp lock is changed to locked.

◆ core_callback_clock_to_repeater()

void core_callback_clock_to_repeater ( void )

Called when the application should configure the hardware to repeat the harp timestamp clock input.

◆ core_callback_clock_to_unlock()

void core_callback_clock_to_unlock ( void )

Called when the timestamp lock is changed to unlocked.

◆ core_callback_define_clock_default()

void core_callback_define_clock_default ( void )

Used to define the clock direction default of the device.

◆ core_callback_device_to_active()

void core_callback_device_to_active ( void )

When the device goes to Active Mode.

◆ core_callback_device_to_speed()

void core_callback_device_to_speed ( void )

When the device goes to Speed Mode.

◆ core_callback_device_to_standby()

void core_callback_device_to_standby ( void )

When the device goes to Standby Mode.

◆ core_callback_initialize_hardware()

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.

◆ core_callback_registers_were_reinitialized()

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.

◆ core_callback_reset_registers()

void core_callback_reset_registers ( void )

Used to initialize the registers. All registers should be written to their default state.

◆ core_callback_t_1ms()

void core_callback_t_1ms ( void )

Called every millisecond.

◆ core_callback_t_500us()

void core_callback_t_500us ( void )

Called 500 microseconds after the "void core_callback_t_1ms(void)".

◆ core_callback_t_after_exec()

void core_callback_t_after_exec ( void )

Called after execute the timer interrupts.

◆ core_callback_t_before_exec()

void core_callback_t_before_exec ( void )

Called before execute the timer interrupts.

◆ core_callback_t_new_second()

void core_callback_t_new_second ( void )

Called every time a new second starts.

◆ core_callback_visualen_to_off()

void core_callback_visualen_to_off ( void )

Called when the application can turn on the visual indicators.

◆ core_callback_visualen_to_on()

void core_callback_visualen_to_on ( void )

Called when the application must turn off all the visual indicators.

◆ core_clock_to_lock()

bool core_clock_to_lock ( void )

Used to lock the timestamp register.

◆ core_clock_to_unlock()

bool core_clock_to_unlock ( void )

Used to unlock the timestamp register.

◆ core_device_to_clock_generator()

bool core_device_to_clock_generator ( void )

Used to set the device as a generator.

◆ core_device_to_clock_repeater()

bool core_device_to_clock_repeater ( void )

Used to set the device as a repeater.

◆ core_func_catastrophic_error_detected()

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

◆ core_func_leave_speed_mode_and_go_to_standby_mode()

void core_func_leave_speed_mode_and_go_to_standby_mode ( void )

Used to leave the speed mode.

◆ core_func_mark_user_timestamp()

void core_func_mark_user_timestamp ( void )

Used to save the current timestamp.

◆ core_func_read_R_TIMESTAMP_MICRO()

uint16_t core_func_read_R_TIMESTAMP_MICRO ( void )

Used to get the content of register R_TIMESTAMP_MICRO.

◆ core_func_read_R_TIMESTAMP_SECOND()

uint32_t core_func_read_R_TIMESTAMP_SECOND ( void )

Used to get the content of register R_TIMESTAMP_SECOND.

◆ core_func_read_user_timestamp()

void core_func_read_user_timestamp ( uint32_t * seconds,
uint16_t * useconds )

Used to read the current user timestamps.

◆ core_func_send_event()

void core_func_send_event ( uint8_t add,
bool use_core_timestamp )

Used to send an Event.

◆ core_func_start_core()

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.

◆ core_func_update_user_timestamp()

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.

◆ core_read_app_register()

bool core_read_app_register ( uint8_t add,
uint8_t type )

Read from an application register.

◆ core_save_all_registers_to_eeprom()

bool core_save_all_registers_to_eeprom ( void )

Used to save all registers to non-volatile memory.

◆ core_write_app_register()

bool core_write_app_register ( uint8_t add,
uint8_t type,
uint8_t * content,
uint16_t n_elements )

Write to an application register.

◆ hwbp_read_common_reg()

bool hwbp_read_common_reg ( uint8_t add,
uint8_t type )

Read from a common register.

◆ hwbp_read_common_reg_CONFIG()

void hwbp_read_common_reg_CONFIG ( void )

Read from common register CONFIG.

◆ hwbp_write_common_reg()

bool hwbp_write_common_reg ( uint8_t add,
uint8_t type,
uint8_t * content,
uint16_t n_elements )

Write to an common register.

◆ hwbp_write_common_reg_CONFIG()

bool hwbp_write_common_reg_CONFIG ( void * a)

Write to common register CONFIG.

◆ hwbp_write_common_reg_RESET_APP()

bool hwbp_write_common_reg_RESET_APP ( void * a)

Write to common register RESET_APP.