You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
2.0 KiB

//#############################################################################################################################################################################################################
#ifndef _INC_SYSTEM_H_
#define _INC_SYSTEM_H_
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#include <inttypes.h>
#include "config.h"
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
#include <avr/eeprom.h>
#include <avr/pgmspace.h>
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#ifdef _LONG_ADDR_SPACE_
#define flash_read_byte(x,y) pgm_read_byte_far(x+y)
#define flash_read_word(x,y) pgm_read_word_far(x+y)
#define flash_read_dword(x,y) pgm_read_dword_far(x+y)
#else
#define flash_read_byte(x,y) pgm_read_byte(x+y)
#define flash_read_word(x,y) pgm_read_word(x+y)
#define flash_read_dword(x,y) pgm_read_dword(x+y)
#endif
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#define System_GetTimeInstance() System_GetSysTick()
uint32_t System_GetSysTick(void);
uint32_t HAL_GetTick(void);
uint32_t System_GetSysTickDifference(uint32_t TimeInstance);
void System_SWReboot(void);
//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
#endif // #ifndef _INC_SYSTEM_H_
//#############################################################################################################################################################################################################