Files @ e159e0fa6e70
Branch filter:

Location: seniordesign-firmware/slave/slave/config.h

kripperger@CL-SEC241-09.cedarville.edu
Added generic cases for daughterboard expansion
/*
 * config.h
 *
 * Created: 10/25/2012 10:00:09 PM
 *  Author: mkanning
 */


 #ifndef CONFIG_H_
 #define CONFIG_H_

 #define F_CPU 11059200				// Clock frequency (used in calculations)

//Serial
#define USART0_BAUDRATE 115200
#define USART1_BAUDRATE 115200 

// Circular serial buffer size. Must be at least MAX_CMD_LEN + 5
#define BUFFER_SIZE 32

// Maximum payload size of command
#define MAX_PAYLOAD_LEN 16

// Number of datatypes to transmit per module type. This should match what is being sent in masterComm.c
#define DATATYPES_GENERIC 3
#define DATATYPES_SENSOR 8
#define DATATYPES_GEIGER 4
#define DATATYPES_CAMERA 3
#define DATATYPES_CUSTOM1 3		// Modules already automatically send 3 values (temp, batt, and heater status.)
#define DATATYPES_CUSTOM2 3		//    Additional sensor readings should be added onto the 3
#define DATATYPES_CUSTOM3 3		//    For example a daughterboard with two sensors would be 3+2=5

//Sensors and IO
#define SENSOR_LOOP 200				// Frequency of sensor reads (in ms) (should be 200)
#define HEATER_THRESHOLD 0			// Temperature threshold in Fahrenheit where heater is activated
#define CAMERA_FREQ 30000		// Camera pulse frequency (Should be 30000 for 30 Secs)
#define CAMERA_PULSE 400 			// Camera pulse duration

 //I2C Addresses
 #define EEPROM_ADDR 0xA0		// Read 0xA1 - Write 0xA0
 #define BOARDTEMP_ADDR 0x90	// Read 0x91 - Write 0x90
 #define PRESSURE_ADDR 0xEE		// Read 0xEF - Write 0xEE
 #define HUMID_ADDR 0x27		// Read 0x28 - Write 0x27
 #define LIGHT_ADDR 0x94		// Read 0x95 - Write 0x94
 #define ACCEL_ADDR	0x38		// Read 0x39 - Write 0x38
 #define RTC_ADDR 0xB2			//DEBUG [Used for testing]      // Read 0xA3 - Write 0xA2



 #endif /* CONFIG_H_ */