#ifndef CONFIG_H
#define CONFIG_H

#define CONFIGWORD (WDTDIS & PWRTEN & MCLREN & BOREN & LVPEN & INTIO)

#define FOSC 4000000
/* Max standard baudrate with FOSC=4000000 is 19200 */
/* Max standard baudrate with FOSC=18432000 is 230400 */
/* Max standard baudrate with FOSC=20000000 is 115200 */
#define BAUDRATE 9600L

typedef unsigned char uint8_t;
typedef signed char sint8_t;
typedef unsigned int uint16_t;
typedef signed int sint16_t;
typedef unsigned long uint32_t;
typedef signed long uint32_t;

/* Serial */
#define RX RB1
#define TRISRX TRISB1
#define TX RB2
#define TRISTX TRISB2

/* DAC */
#define D15 RB7
#define D14 RB6
#define D13 RB5
#define D12 RB3
#define D11 RA3
#define D10 RA2
#define D9 RA1
#define D8 RA0
#define LDAC RB0
#define TRIS_D15 TRISB7
#define TRIS_D14 TRISB6
#define TRIS_D13 TRISB5
#define TRIS_D12 TRISB3
#define TRIS_D11 TRISA3
#define TRIS_D10 TRISA2
#define TRIS_D9 TRISA1
#define TRIS_D8 TRISA0
#define TRIS_LDAC TRISB0

#endif
