Rev 283 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#ifndef DEFINES_H
#define DEFINES_H
#include <xc.h>
#include <stdint.h>
//#define CONTROL_FROM_CONTROLLER
#define CONTROL_FROM_UART
// <editor-fold defaultstate="collapsed" desc="I/O Pins">
#define LED_1_TRIS TRISCbits.TRISC2
#define LED_1_LAT LATCbits.LATC2
#define LED_2_TRIS TRISCbits.TRISC4
#define LED_2_LAT LATCbits.LATC4
#define CCP_1_TRIS TRISCbits.TRISC5
#define CCP_1_LAT LATCbits.LATC5
#define CCP_2_TRIS TRISCbits.TRISC3
#define CCP_2_LAT LATCbits.LATC3
#define I2C_1_CLK_TRIS TRISCbits.TRISC0
#define I2C_1_DAT_TRIS TRISCbits.TRISC1
#define UART_RX_TRIS TRISAbits.TRISA1
#define UART_TX_TRIS TRISAbits.TRISA0
// </editor-fold>
#define _XTAL_FREQ 32000000
#define PWM_NOMINAL 1500
#define PWM_MAX 1950
#define PWM_MIN 1050
#define UART_STATE_READ_CMD 0x1
#define UART_STATE_READ_DATA 0x2
#define UART_CMD_RESET 0x1
#define UART_CMD_LEFT_FORWARD 0x2
#define UART_CMD_LEFT_BACKWARD 0x3
#define UART_CMD_RIGHT_FORWARD 0x4
#define UART_CMD_RIGHT_BACKWARD 0x5
#endif /* DEFINES_H */