MODIF - Moved all of the configurations out of the libraries and into the configs git-svn-id: svn+ssh://oldsvn/home/mlalondesvn/svn/cral@7 3ee9b42a-b53c-0410-a25e-f0b6218d5d5bmaster
							parent
							
								
									835bc100b5
								
							
						
					
					
						commit
						1d1f320cd8
					
				@ -0,0 +1,37 @@
 | 
				
			||||
#ifndef DS1337_CONFIG
 | 
				
			||||
#define DS1337_CONFIG
 | 
				
			||||
	
 | 
				
			||||
	/**
 | 
				
			||||
	 * Define the DS1337 I2C addresses
 | 
				
			||||
	**/
 | 
				
			||||
	#define DS1337_WADDR		B01101000 /* 0x68 */
 | 
				
			||||
	
 | 
				
			||||
	// Ucomment this to enable setting the clock from a 
 | 
				
			||||
	// unix time stamp with gmt and dst correction
 | 
				
			||||
	#define DS1337_USE_SET_UTS
 | 
				
			||||
 | 
				
			||||
	// Uncomment this enable setting the clock using BCD
 | 
				
			||||
	//#define DS1337_USE_BCD_CLOCKSET
 | 
				
			||||
 | 
				
			||||
	// Uncomment this if you need to read back unix time stamp (without DTS correction)
 | 
				
			||||
	//#define DS1337_USE_GET_UTS
 | 
				
			||||
 | 
				
			||||
	// Uncomment this to support alarms
 | 
				
			||||
	#define DS1337_USE_ALARMS
 | 
				
			||||
 | 
				
			||||
	#ifdef DS1337_USE_ALARMS
 | 
				
			||||
	// Uncomment this to allow use external alarm interrupts
 | 
				
			||||
	#define DS1337_USE_ALARM_INTERRUPTS
 | 
				
			||||
 | 
				
			||||
	// Uncomment this to allow alarm functions callback
 | 
				
			||||
	#define DS1337_USE_ALARMS_CALLBACK
 | 
				
			||||
	#endif
 | 
				
			||||
 | 
				
			||||
	// Uncomment this to use integrity check functions
 | 
				
			||||
	//#define DS1337_USE_OSC_INTEGRITY
 | 
				
			||||
 | 
				
			||||
	// Uncomment this to support square wave output
 | 
				
			||||
	// If this is enabled, alarm 2 will output it's interrupt on INTA
 | 
				
			||||
	#define DS1337_USE_SQW_OUTPUT
 | 
				
			||||
	
 | 
				
			||||
#endif
 | 
				
			||||
@ -0,0 +1,18 @@
 | 
				
			||||
#ifndef DS1624_CONFIG
 | 
				
			||||
#define DS1624_CONFIG
 | 
				
			||||
	/**
 | 
				
			||||
	 * Address byte selection
 | 
				
			||||
	 * Select 0 for low and 1 for high
 | 
				
			||||
	**/
 | 
				
			||||
	#define DS1624_A0			0
 | 
				
			||||
	#define DS1624_A1			0
 | 
				
			||||
	#define DS1624_A2			0
 | 
				
			||||
 | 
				
			||||
	/**
 | 
				
			||||
	 * Comment this out if you don't want the 
 | 
				
			||||
	 * init function to account for the ~1S startup
 | 
				
			||||
	 * delay for the first temperature sample!
 | 
				
			||||
	**/
 | 
				
			||||
	#define DS1624_HANDLE_BOOT_DELAY
 | 
				
			||||
 | 
				
			||||
#endif
 | 
				
			||||
@ -0,0 +1,15 @@
 | 
				
			||||
#ifndef DS1803_CONFIG
 | 
				
			||||
#define DS1803_CONFIG
 | 
				
			||||
 | 
				
			||||
	/**
 | 
				
			||||
	 * Address byte selection
 | 
				
			||||
	 * Select 0 for low and 1 for high
 | 
				
			||||
	**/
 | 
				
			||||
	#define DS1803_A0			0
 | 
				
			||||
	#define DS1803_A1			0
 | 
				
			||||
	#define DS1803_A2			0
 | 
				
			||||
	
 | 
				
			||||
	// Uncomment this to use the the read back function
 | 
				
			||||
	//#define DS1803_USE_GET_VALUE_FUNC
 | 
				
			||||
	
 | 
				
			||||
#endif
 | 
				
			||||
@ -0,0 +1,53 @@
 | 
				
			||||
#ifndef TWILCD_CONFIG
 | 
				
			||||
#define TWILCD_CONFIG
 | 
				
			||||
		
 | 
				
			||||
	/**
 | 
				
			||||
	 * Address byte selection
 | 
				
			||||
	 * Select 0 for low and 1 for high
 | 
				
			||||
	**/
 | 
				
			||||
	#define PCF8574_A0			0
 | 
				
			||||
	#define PCF8574_A1			0
 | 
				
			||||
	#define PCF8574_A2			0
 | 
				
			||||
	
 | 
				
			||||
	// Uncomment this to use minimal mode (less functions, not as big)
 | 
				
			||||
	//	#define TWI_LCD_SMALL
 | 
				
			||||
 | 
				
			||||
	#if defined(__AVR_ATmega168__) && !defined(TWI_LCD_SMALL)
 | 
				
			||||
		// Uncomment this to enable use of a timeout after which the LCD turns off
 | 
				
			||||
		#define TWI_LCD_USE_TIMEOUT
 | 
				
			||||
 | 
				
			||||
	#ifdef TWI_LCD_USE_TIMEOUT
 | 
				
			||||
		#define	TWI_LCD_TIMEOUT		5000	/* In milliseconds (30 sec) */
 | 
				
			||||
	#endif
 | 
				
			||||
 | 
				
			||||
		// Uncomment this to enable control of the backlight on pin 3
 | 
				
			||||
		#define TWI_LCD_CTRL
 | 
				
			||||
 | 
				
			||||
	#ifdef TWI_LCD_CTRL
 | 
				
			||||
		// Uncomment this to use PWM for backlight control.
 | 
				
			||||
		//#define TWI_LCD_BL_PWM
 | 
				
			||||
 | 
				
			||||
	#ifdef TWI_LCD_BL_PWM
 | 
				
			||||
		// Set this to the default brightness for PWM controlled backlight
 | 
				
			||||
		#define TWI_LCD_BL_LEVEL	255
 | 
				
			||||
	#endif
 | 
				
			||||
 | 
				
			||||
	#ifndef TWI_LCD_BL_PWM
 | 
				
			||||
		// Uncomment this use the DS1803 digi-pot for display/backlight brightness
 | 
				
			||||
		#define TWI_LCD_DPOT_CTRL
 | 
				
			||||
 | 
				
			||||
	#ifdef TWI_LCD_DPOT_CTRL
 | 
				
			||||
		// Set this to the default value of the backlight (0 to 254)
 | 
				
			||||
		#define TWI_LCD_BL_LEVEL	254
 | 
				
			||||
 | 
				
			||||
		// Set this to the default value of the display brightness (0 to 254)
 | 
				
			||||
		#define TWI_LCD_DB_LEVEL	225
 | 
				
			||||
	#endif
 | 
				
			||||
	#endif
 | 
				
			||||
	// End LCD Control
 | 
				
			||||
	#endif
 | 
				
			||||
 | 
				
			||||
	// End Small version
 | 
				
			||||
	#endif
 | 
				
			||||
	
 | 
				
			||||
#endif
 | 
				
			||||
@ -1,53 +1,57 @@
 | 
				
			||||
#ifndef DS1803_H
 | 
				
			||||
#define DS1803_H
 | 
				
			||||
	#include <inttypes.h>
 | 
				
			||||
	#include "../configs/ds1803/ds1803.h"
 | 
				
			||||
 | 
				
			||||
#include <inttypes.h>
 | 
				
			||||
 | 
				
			||||
/**
 | 
				
			||||
 * Address byte selection
 | 
				
			||||
 * Select 0 for low and 1 for high
 | 
				
			||||
**/
 | 
				
			||||
#define DS1803_A0			0
 | 
				
			||||
#define DS1803_A1			0
 | 
				
			||||
#define DS1803_A2			0
 | 
				
			||||
 | 
				
			||||
#define DS1803_BASE_ADDR	B00101000
 | 
				
			||||
#define DS1803_WADDR		DS1803_BASE_ADDR | (DS1803_A0 * B00000001) | (DS1803_A1 * B00000010) | (DS1803_A2 * B00000100)
 | 
				
			||||
#define DS1803_RADDR		DS1803_WADDR | 0x01
 | 
				
			||||
 | 
				
			||||
/**
 | 
				
			||||
 * The number of available potentiometer wipers
 | 
				
			||||
**/
 | 
				
			||||
#define	DS1803_NBR_WIPERS	0x02
 | 
				
			||||
 | 
				
			||||
/**
 | 
				
			||||
 * Digital pot selection commands
 | 
				
			||||
**/
 | 
				
			||||
#define DS1803_WIPERS	B10101111
 | 
				
			||||
#define DS1803_WIPER_0	B10101001
 | 
				
			||||
#define DS1803_WIPER_1	B10101010
 | 
				
			||||
 | 
				
			||||
/**
 | 
				
			||||
 * Macros
 | 
				
			||||
**/
 | 
				
			||||
#define setWiper1(value) setWiper(value, DS1803_WIPER_0)
 | 
				
			||||
#define setWiper2(value) setWiper(value, DS1803_WIPER_1)
 | 
				
			||||
#define setWipers(value) setWiper(value, DS1803_WIPERS)
 | 
				
			||||
 | 
				
			||||
/**
 | 
				
			||||
 * DS1803 I2C Dual Digital Pot.
 | 
				
			||||
**/
 | 
				
			||||
class DS1803
 | 
				
			||||
{
 | 
				
			||||
	public:
 | 
				
			||||
		DS1803();
 | 
				
			||||
		void setWiper(uint8_t, uint8_t);
 | 
				
			||||
		//uint8_t getValue();
 | 
				
			||||
};
 | 
				
			||||
 | 
				
			||||
/**
 | 
				
			||||
 * Define the object's name
 | 
				
			||||
**/
 | 
				
			||||
extern DS1803 DPOT;
 | 
				
			||||
#ifdef DS1803_A0
 | 
				
			||||
	#define DS1803_A0			0
 | 
				
			||||
#endif
 | 
				
			||||
#ifdef DS1803_A1
 | 
				
			||||
	#define DS1803_A1			0
 | 
				
			||||
#endif
 | 
				
			||||
#ifdef DS1803_A2
 | 
				
			||||
	#define DS1803_A2			0
 | 
				
			||||
#endif
 | 
				
			||||
 | 
				
			||||
	#define DS1803_BASE_ADDR	B00101000
 | 
				
			||||
	#define DS1803_WADDR		DS1803_BASE_ADDR | (DS1803_A0 * B00000001) | (DS1803_A1 * B00000010) | (DS1803_A2 * B00000100)
 | 
				
			||||
	#define DS1803_RADDR		DS1803_WADDR | 0x01
 | 
				
			||||
 | 
				
			||||
	/**
 | 
				
			||||
	 * The number of available potentiometer wipers
 | 
				
			||||
	**/
 | 
				
			||||
	#define	DS1803_NBR_WIPERS	0x02
 | 
				
			||||
 | 
				
			||||
	/**
 | 
				
			||||
	 * Digital pot selection commands
 | 
				
			||||
	**/
 | 
				
			||||
	#define DS1803_WIPERS	B10101111
 | 
				
			||||
	#define DS1803_WIPER_0	B10101001
 | 
				
			||||
	#define DS1803_WIPER_1	B10101010
 | 
				
			||||
 | 
				
			||||
	/**
 | 
				
			||||
	 * Macros
 | 
				
			||||
	**/
 | 
				
			||||
	#define setWiper1(value) setWiper(value, DS1803_WIPER_0)
 | 
				
			||||
	#define setWiper2(value) setWiper(value, DS1803_WIPER_1)
 | 
				
			||||
	#define setWipers(value) setWiper(value, DS1803_WIPERS)
 | 
				
			||||
 | 
				
			||||
	/**
 | 
				
			||||
	 * DS1803 I2C Dual Digital Pot.
 | 
				
			||||
	**/
 | 
				
			||||
	class DS1803
 | 
				
			||||
	{
 | 
				
			||||
		public:
 | 
				
			||||
			DS1803();
 | 
				
			||||
			void setWiper(uint8_t, uint8_t);
 | 
				
			||||
		#ifdef DS1803_USE_GET_VALUE_FUNC
 | 
				
			||||
			uint8_t getValue();
 | 
				
			||||
		#endif
 | 
				
			||||
	};
 | 
				
			||||
 | 
				
			||||
	/**
 | 
				
			||||
	 * Define the object's name
 | 
				
			||||
	**/
 | 
				
			||||
	extern DS1803 DPOT;
 | 
				
			||||
 | 
				
			||||
#endif
 | 
				
			||||
 | 
				
			||||
@ -1,45 +0,0 @@
 | 
				
			||||
#ifndef TWI_LCD_CONF_H
 | 
				
			||||
#define TWI_LCD_CONF_H
 | 
				
			||||
 | 
				
			||||
// Uncomment this to use minimal mode (less functions, not as big)
 | 
				
			||||
//	#define TWI_LCD_SMALL
 | 
				
			||||
 | 
				
			||||
#if defined(__AVR_ATmega168__) && !defined(TWI_LCD_SMALL)
 | 
				
			||||
	// Uncomment this to enable use of a timeout after which the LCD turns off
 | 
				
			||||
	#define TWI_LCD_USE_TIMEOUT
 | 
				
			||||
 | 
				
			||||
#ifdef TWI_LCD_USE_TIMEOUT
 | 
				
			||||
	#define	TWI_LCD_TIMEOUT		5000	/* In milliseconds (30 sec) */
 | 
				
			||||
#endif
 | 
				
			||||
 | 
				
			||||
	// Uncomment this to enable control of the backlight on pin 3
 | 
				
			||||
	#define TWI_LCD_CTRL
 | 
				
			||||
 | 
				
			||||
#ifdef TWI_LCD_CTRL
 | 
				
			||||
	// Uncomment this to use PWM for backlight control.
 | 
				
			||||
	//#define TWI_LCD_BL_PWM
 | 
				
			||||
 | 
				
			||||
#ifdef TWI_LCD_BL_PWM
 | 
				
			||||
	// Set this to the default brightness for PWM controlled backlight
 | 
				
			||||
	#define TWI_LCD_BL_LEVEL	255
 | 
				
			||||
#endif
 | 
				
			||||
 | 
				
			||||
#ifndef TWI_LCD_BL_PWM
 | 
				
			||||
	// Uncomment this use the DS1803 digi-pot for display/backlight brightness
 | 
				
			||||
	#define TWI_LCD_DPOT_CTRL
 | 
				
			||||
	
 | 
				
			||||
#ifdef TWI_LCD_DPOT_CTRL
 | 
				
			||||
	// Set this to the default value of the backlight (0 to 254)
 | 
				
			||||
	#define TWI_LCD_BL_LEVEL	254
 | 
				
			||||
	
 | 
				
			||||
	// Set this to the default value of the display brightness (0 to 254)
 | 
				
			||||
	#define TWI_LCD_DB_LEVEL	225
 | 
				
			||||
#endif
 | 
				
			||||
#endif
 | 
				
			||||
// End LCD Control
 | 
				
			||||
#endif
 | 
				
			||||
 | 
				
			||||
// End Small version
 | 
				
			||||
#endif
 | 
				
			||||
 | 
				
			||||
#endif
 | 
				
			||||
					Loading…
					
					
				
		Reference in new issue