8 #include PLATFORM_HEADER
11 #include "hal/micro/micro-common.h"
29 GPIO_DBGCFG &= ~GPIO_EXTREGEN;
35 #ifndef DISABLE_WATCHDOG
52 OSC24M_CTRL = OSC24M_CTRL_RESET;
53 CPU_CLKSEL = CPU_CLKSEL_RESET;
55 SCS_AIRCR = (0x05FA0000 | SCS_AIRCR_SYSRESETREQ);
73 static int16u seed0 = 0xbeef;
74 static int16u seed1 = 0xface;
78 seed0 = (int16u) seed;
81 seed1 = (int16u) (seed >> 16);
86 static int16u shift(int16u *val, int16u taps)
98 return (shift(&seed0, 0x0062)
99 ^ shift(&seed1, 0x100B));
102 void halCommonMemCopy(
void *dest,
const void *source, int8u bytes)
104 memcpy(dest, source, bytes);
107 int8s halCommonMemCompare(
const void *source0,
const void *source1, int8u bytes)
109 return memcmp(source0, source1, bytes);
112 void halCommonMemSet(
void *dest, int8u val, int16u bytes)
114 memset(dest, val, bytes);
118 typedef struct appSwitchStruct {
126 } appSwitchStructType;
128 static appSwitchStructType *appSwitch = (appSwitchStructType *) RAM_BOTTOM;
133 int8u cut = *(
volatile int8u *) 0x08040798;
134 if (!( (halFixedAddressTable.baseTable.type == FIXED_ADDRESS_TABLE_TYPE) &&
135 ( ( (halFixedAddressTable.baseTable.version & FAT_MAJOR_VERSION_MASK)
137 (halFixedAddressTable.baseTable.version == 0x0003)
138 ) && (cut >= 2) && (cut <= 3)))
145 appSwitch->param.panID = panID;
151 appSwitch->mode = mode;