@@ -18,9 +18,12 @@ typedef struct {
1818 uint16_t usecond ;
1919} timestamp_t ;
2020
21+ // Used to define the clock direction default of the device.
22+ void core_callback_define_clock_default (void );
23+
2124// It's the first callback used, right after booting the core.
2225// The pins, ports and external hardware should be initialized.
23- void core_callback_1st_config_hw_after_boot (void );
26+ void core_callback_initialize_hardware (void );
2427
2528// Used to initialize the registers.
2629// All registers should be written to their default state.
@@ -43,7 +46,6 @@ void core_callback_device_to_active(void);
4346void core_callback_device_to_speed (void );
4447
4548
46-
4749// Called before execute the timer interrupts
4850void core_callback_t_before_exec (void );
4951// Called after execute the timer interrupts
@@ -57,7 +59,6 @@ void core_callback_t_500us(void);
5759void core_callback_t_new_second (void );
5860
5961
60-
6162// Read from an application register.
6263bool core_read_app_register (uint8_t add , uint8_t type );
6364// Write to an application register.
@@ -68,6 +69,48 @@ bool hwbp_read_common_reg(uint8_t add, uint8_t type);
6869bool hwbp_write_common_reg (uint8_t add , uint8_t type , uint8_t * content , uint16_t n_elements );
6970
7071
72+ /************************************************************************/
73+ /* Register RESET_APP */
74+ /************************************************************************/
75+ // Write to common register RESET_APP.
76+ bool hwbp_write_common_reg_RESET_APP (void * a );
77+
78+ // Used to save all registers to non-volatile memory
79+ bool core_save_all_registers_to_eeprom (void );
80+
81+
82+ /************************************************************************/
83+ /* Register CONFIG */
84+ /************************************************************************/
85+ // Write to common register CONFIG.
86+ bool hwbp_write_common_reg_CONFIG (void * a );
87+ // Read from common register CONFIG.
88+ void hwbp_read_common_reg_CONFIG (void );
89+
90+ // Called when the application should configure the hardware to repeat the harp timestamp clock input.
91+ void core_callback_clock_to_repeater (void );
92+ // Called when the application should configure the hardware to generate the harp timestamp clock.
93+ void core_callback_clock_to_generator (void );
94+ // Called when the timestamp lock is changed to unlocked.
95+ void core_callback_clock_to_unlock (void );
96+ // Called when the timestamp lock is changed to locked.
97+ void core_callback_clock_to_lock (void );
98+
99+ // Used to know if the device is repeating the harp timestamp clock
100+ bool core_bool_device_is_repeater (void );
101+ // Used to know if the device is generating the harp timestamp clock
102+ bool core_bool_device_is_generator (void );
103+ // Used to check if the timestamp register is locked
104+ bool core_bool_clock_is_locked (void );
105+
106+ // Used to set the device as a repeater
107+ bool core_device_to_clock_repeater (void );
108+ // Used to set the device as a generator
109+ bool core_device_to_clock_generator (void );
110+ // Used to lock the timestamp register
111+ bool core_clock_to_lock (void );
112+ // Used to unlock the timestamp register
113+ bool core_clock_to_unlock (void );
71114
72115
73116// It is mandatory that this function is the first of the application code.
@@ -81,7 +124,11 @@ void core_func_start_core (
81124 uint8_t * pointer_to_app_regs ,
82125 const uint16_t app_mem_size_to_save ,
83126 const uint8_t num_of_app_registers ,
84- const uint8_t * device_name );
127+ const uint8_t * device_name ,
128+ const bool device_is_able_to_repeat_clock ,
129+ const bool device_is_able_to_generate_clock ,
130+ const uint8_t default_timestamp_offset
131+ );
85132
86133// Call this function in case of error
87134// A power up or reset must be performed to remove the device from this state
@@ -113,6 +160,7 @@ uint16_t core_func_read_R_TIMESTAMP_MICRO(void);
113160
114161
115162
163+
116164// Return "true" if the LEDs can be ON.
117165bool core_bool_is_visual_enabled (void );
118166// Return "true" if the device is in Speed Mode.
0 commit comments