X-Git-Url: http://git.kpe.io/?p=avr_bc100.git;a=blobdiff_plain;f=BaseTinyFirmware%2FGCC%2Fstatefunc.h;fp=BaseTinyFirmware%2FGCC%2Fstatefunc.h;h=699b93e5a939824f68380eb78a7a0ef5dbadfad2;hp=9594f441213bbebb0bea1ee78b7a72a39d46cc56;hb=65612c4c7df34cdae10f9427ace6fd9e9e430d05;hpb=89173ec9cd6f33843bf27c45be0f2f9be3f5f0ce diff --git a/BaseTinyFirmware/GCC/statefunc.h b/BaseTinyFirmware/GCC/statefunc.h index 9594f44..699b93e 100644 --- a/BaseTinyFirmware/GCC/statefunc.h +++ b/BaseTinyFirmware/GCC/statefunc.h @@ -10,14 +10,14 @@ * AVR458: Charging Li-Ion Batteries with BC100 * * \par Documentation - * For comprehensive code documentation, supported compilers, compiler + * For comprehensive code documentation, supported compilers, compiler * settings and supported devices see readme.html * * \author * Atmel Corporation: http://www.atmel.com \n * Support email: avr@atmel.com * - * + * * $Name$ * $Revision: 2261 $ * $RCSfile$ @@ -28,6 +28,11 @@ #ifndef STATEFUNC_H #define STATEFUNC_H +//! number of connectors (1: just process A, 2 process A and B ) +#define BATCONN 1 +#if ( BATCONN < 1 ) || ( BATCONN > 2 ) +#error "Invalid BATCONN. Must be set to 1 or 2." +#endif //****************************************************************************** // Wanted SPI-mode @@ -36,7 +41,7 @@ #define SPIMODE 0 //! Sample on leading _falling_ edge, setup on trailing _rising_ edge. -//#define SPIMODE 1 +//#define SPIMODE 1 //****************************************************************************** @@ -53,19 +58,19 @@ // Error-flag bit identifiers //****************************************************************************** //! Wrong jumper settings. -#define ERR_JUMPER_MISMATCH 0x01 +#define ERR_JUMPER_MISMATCH 0x01 //! Both batteries disabled. -#define ERR_NO_BATTERIES_ENABLED 0x02 +#define ERR_NO_BATTERIES_ENABLED 0x02 //! PWM output too much/little. -#define ERR_PWM_CONTROL 0x04 +#define ERR_PWM_CONTROL 0x04 //! Battery temperature out of limits. -#define ERR_BATTERY_TEMPERATURE 0x08 +#define ERR_BATTERY_TEMPERATURE 0x08 //! Battery couldn't be charged. -#define ERR_BATTERY_EXHAUSTED 0x10 +#define ERR_BATTERY_EXHAUSTED 0x10 //******************************************************************************