NetBurner 3.1
hal.h
Go to the documentation of this file.
1 /*NB_REVISION*/
2 
3 /*NB_COPYRIGHT*/
4 
19 #ifndef _NB_HAL_H_
20 #define _NB_HAL_H_
21 
22 #include <stdint.h>
23 
28 void HardwareSetup();
29 
34 void ForceReboot(bool bFromException = false) __attribute__((noreturn));
35 
43 void FlashErase(void *pWhere, int len);
44 
53 void FlashProgram(void *pWhere, void *pWhat, int len);
54 
67 void FlashProgramAppImage(void *pWhere, void *pWhat, int len);
68 
73 void DisableCache();
74 
79 void EnableCache();
80 
86 uint32_t spaceleft();
87 
99 extern void (*watchdog_service_function)(void);
100 
107 extern uint16_t HalGetTickFraction(void);
108 
109 #ifdef GATHER_RANDOM_USE_HW
110 
116 extern bool HalHWRandRdy(void);
117 
123 extern uint32_t HalGetHWRand32(void);
124 #endif
125 
131 extern uint32_t HalTickMaxCount;
132 
143 void StdioCheckIntc(void);
144 
150 void SysLogCheckIntc(void);
151 
152 
153 bool HalDeviceCertValid();
154 uint8_t * HalGetDeviceCert();
155 uint8_t * HalGetDeviceKey();
156 bool HalSaveNewDeviceCert(const uint8_t *cert, uint16_t certlen);
157 bool HalSaveNewDeviceKey(const uint8_t *key, uint16_t keylen);
158 void HalEraseDeviceCertAndKey();
159 
160 #endif /* _NB_HAL_H_ */
uint32_t HalTickMaxCount
Rollover value for the system hardware tick timer.
void SysLogCheckIntc(void)
This is just like the StdioCheckIntc() function, except that the results are displayed via UDP...
void FlashProgramAppImage(void *pWhere, void *pWhat, int len)
Write an application image to flash memory.
void(* watchdog_service_function)(void)
Watchdog callback service function.
Definition: watchdog.cpp:8
uint32_t spaceleft()
Report how much free unallocated space is left in dynamic memory.
void EnableCache()
Enable the instruction and data cache.
void StdioCheckIntc(void)
Check STDIO interrupt sources.
void ForceReboot(bool bFromException=false)
Forces the system hardware to perform a soft reset.
uint16_t HalGetTickFraction(void)
Returns the fraction of the current system time tick.
void DisableCache()
Disable the instruction and data cache.
void FlashProgram(void *pWhere, void *pWhat, int len)
Program flash memory.
void HardwareSetup()
Initializes the system hardware such as the timer, cache and clock speed.
void FlashErase(void *pWhere, int len)
Erases the flash memory.