1 #ifndef BASICS_H_INCLUDED 2 #define BASICS_H_INCLUDED 32 #define int8u unsigned char 33 #define int8s signed char 35 #define int16u unsigned int 36 #define int16s signed int 38 #define int24u unsigned long 39 #define int24s signed long 41 #define int32u unsigned long 42 #define int32s signed long 44 #define int8u unsigned char 45 #define int8s signed char 47 #define int16u unsigned short 48 #define int16s signed short 50 #define int24u unsigned short long 51 #define int24s signed short long 53 #define int32u unsigned long 54 #define int32s signed long 94 #define shift_right_signed_32(x) x >>= 1; 96 #define shift_right_signed_32(x) x >>= 1; \ 104 #define shift_right_signed_16(x) x >>= 1; 106 #define shift_right_signed_16(x) x >>= 1; \ 124 #define abs(x ) ((x) > 0 ? (x) : -(x)) 126 #define abslimit(val, lim) { \ 127 if ((val) > (lim)) (val) = (lim); \ 128 else if ((val) < -(lim)) (val) = -(lim); \ 132 #define rshift_sgn(val, shift) (((val) > 0) ? ((val) >> (shift)) : -((-(val))>>(shift))) 137 #define RXM0SIDL_EXIDEN RXM0SIDLbits.EXIDEN 138 #define RXM1SIDL_EXIDEN RXM1SIDLbits.EXIDEN 139 #define ECANCON_MDSEL1 ECANCONbits.MDSEL1 140 #define ECANCON_MDSEL0 ECANCONbits.MDSEL0 141 #define COMSTAT_FIFOEMPTY COMSTATbits.FIFOEMPTY 142 #define PIR3_RXBnIF PIR3bits.RXBnIF 143 #define COMSTAT_RXBnOVFL COMSTATbits.RXBnOVFL 144 #define PIR3_IRXIF PIR3bits.IRXIF 146 #define TXB0CON_TXREQ TXB0CONbits.TXREQ 147 #define TXB1CON_TXREQ TXB1CONbits.TXREQ 148 #define TXB2CON_TXREQ TXB2CONbits.TXREQ 149 #define BSEL0_B0TXEN BSEL0bits.B0TXEN 150 #define B0CON_TXREQ B0CONbits.TXREQ 152 #define BSEL0_B1TXEN BSEL0bits.B1TXEN 153 #define B1CON_TXREQ B1CONbits.TXREQ 154 #define BSEL0_B2TXEN BSEL0bits.B2TXEN 155 #define B2CON_TXREQ B2CONbits.TXREQ 156 #define BSEL0_B3TXEN BSEL0bits.B3TXEN 157 #define B3CON_TXREQ B3CONbits.TXREQ 158 #define BSEL0_B4TXEN BSEL0bits.B4TXEN 159 #define B4CON_TXREQ B4CONbits.TXREQ 160 #define BSEL0_B5TXEN BSEL0bits.B5TXEN 161 #define B5CON_TXREQ B5CONbits.TXREQ 162 #define RXB0CON_RXFUL RXB0CONbits.RXFUL 163 #define PIR3_RXB0IF PIR3bits.RXB0IF 164 #define COMSTAT_RXB0OVFL COMSTATbits.RXB0OVFL 166 #define RXB0CON_FILHIT0 RXB0CONbits.FILHIT0 167 #define RXB1CON_RXFUL RXB1CONbits.RXFUL 168 #define PIR3_RXB1IF PIR3bits.RXB1IF 169 #define COMSTAT_RXB1OVFL COMSTATbits.RXB1OVFL 171 #define RXFCON0_RXF0EN RXFCON0bits.RXF0EN 172 #define RXFCON0_RXF1EN RXFCON0bits.RXF1EN 173 #define RXFCON0_RXF2EN RXFCON0bits.RXF2EN 174 #define RXFCON0_RXF3EN RXFCON0bits.RXF3EN 175 #define B0CON_RXFUL B0CONbits.RXFUL 176 #define B1CON_RXFUL B1CONbits.RXFUL 177 #define B2CON_RXFUL B2CONbits.RXFUL 178 #define B3CON_RXFUL B3CONbits.RXFUL 179 #define B4CON_RXFUL B4CONbits.RXFUL 180 #define B5CON_RXFUL B5CONbits.RXFUL 185 #define _endasm __endasm 188 #define msg_copy(dest, src) { dest.messageID=src.messageID; dest.d.dword[0]=src.d.dword[0]; dest.d.dword[1]=src.d.dword[1]; dest.length=src.length; dest.flags=src.flags; } 190 #define msg_copy(dest, src) dest=src 197 #define Delay1TCY Nop 198 #define Delay10TCYx delay10tcy 199 #define Delay100TCYx delay100tcy 200 #define Delay10KTCYx delay10ktcy; 201 #define Delay1KTCYx delay1ktcy; 205 #define Delay10TCYx(x) 206 #define Delay100TCYx(x) 207 #define Delay10KTCYx(x) 208 #define Delay1KTCYx(x) 209 #define delay1mtcy(x) 213 #define delay1mtcy(x) { int8u d; for (d=0;d<100; d++) Delay10KTCYx(d); }
const int8u basic_lshift[]
void ShiftLeft64(union union64 *p)
void Reset_func(void)
Use this instead of Reset to keep optimization.
void ClrWdt_func(void)
Clear Watchdog Timer.