20,20 → 20,34 |
#define US_TO_CT_TICKS (CPU_CLOCK_HZ/2000000UL) |
|
#define ADDRESS_EEPROM 0x50 |
#define ADDRESS_CONTROLLER_1 0x24 |
#define ADDRESS_CONTROLLER_2 0x25 |
|
// LED1 = G12, LED2 = G13, LED3 = G14, LED4 = G15 (active high) |
#define LED1_TRIS TRISGbits.TRISG12 |
#define LED1_PORT PORTGbits.RG12 |
#define LED1_LAT LATGbits.LATG12 |
#define LED2_TRIS TRISGbits.TRISG13 |
#define LED2_PORT PORTGbits.RG13 |
#define LED2_LAT LATGbits.LATG13 |
#define LED3_TRIS TRISGbits.TRISG14 |
#define LED3_PORT PORTGbits.RG14 |
#define LED3_LAT LATGbits.LATG14 |
#define LED4_TRIS TRISGbits.TRISG15 |
#define LED4_PORT PORTGbits.RG15 |
#define LED4_LAT LATGbits.LATG15 |
|
void Delay_MS(uint32_t delay_ms); |
void Delay_US(uint32_t delay_us); |
|
// <editor-fold defaultstate="collapsed" desc="IPL"> |
/* |
IPL1 = lowest, IPL7 = highest priority |
SPI1 - Priority 5, Subpriority 1 |
SPI4 - Priority 6, Subpriority 2 |
I2C1 - Priority 5, Subpriority 1 |
TIMER4 - Priority 3, Subpriority 1 |
TIMER5 - Priority 3, Subpriority 1 |
UART1 - Priority 2, Subpriority 1 |
*/ |
// </editor-fold> |
|
// <editor-fold desc="PMOD to MCU Pinouts"> |
/* |
JA-01 AN2/C2IN-/CN4/RB2 RB02 |