* AVR458: Charging Li-Ion Batteries with BC100\r
*\r
* \par Documentation\r
- * For comprehensive code documentation, supported compilers, compiler \r
+ * For comprehensive code documentation, supported compilers, compiler\r
* settings and supported devices see readme.html\r
*\r
* \author\r
* Atmel Corporation: http://www.atmel.com \n\r
* Support email: avr@atmel.com\r
*\r
- * \r
+ *\r
* $Name$\r
* $Revision: 2261 $\r
* $RCSfile$\r
#ifndef STATEFUNC_H\r
#define STATEFUNC_H\r
\r
+//! number of connectors (1: just process A, 2 process A and B )\r
+#define BATCONN 1\r
+#if ( BATCONN < 1 ) || ( BATCONN > 2 )\r
+#error "Invalid BATCONN. Must be set to 1 or 2."\r
+#endif\r
\r
//******************************************************************************\r
// Wanted SPI-mode\r
#define SPIMODE 0\r
\r
//! Sample on leading _falling_ edge, setup on trailing _rising_ edge.\r
-//#define SPIMODE 1 \r
+//#define SPIMODE 1\r
\r
\r
//******************************************************************************\r
// Error-flag bit identifiers\r
//******************************************************************************\r
//! Wrong jumper settings.\r
-#define ERR_JUMPER_MISMATCH 0x01 \r
+#define ERR_JUMPER_MISMATCH 0x01\r
\r
//! Both batteries disabled.\r
-#define ERR_NO_BATTERIES_ENABLED 0x02 \r
+#define ERR_NO_BATTERIES_ENABLED 0x02\r
\r
//! PWM output too much/little.\r
-#define ERR_PWM_CONTROL 0x04 \r
+#define ERR_PWM_CONTROL 0x04\r
\r
//! Battery temperature out of limits.\r
-#define ERR_BATTERY_TEMPERATURE 0x08 \r
+#define ERR_BATTERY_TEMPERATURE 0x08\r
\r
//! Battery couldn't be charged.\r
-#define ERR_BATTERY_EXHAUSTED 0x10 \r
+#define ERR_BATTERY_EXHAUSTED 0x10\r
\r
\r
//******************************************************************************\r