projects
/
avr_bc100.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Commit mthomas changes to GCC and port those changes to IAR
[avr_bc100.git]
/
BaseTinyFirmware
/
GCC
/
statefunc.h
diff --git
a/BaseTinyFirmware/GCC/statefunc.h
b/BaseTinyFirmware/GCC/statefunc.h
index 9594f441213bbebb0bea1ee78b7a72a39d46cc56..699b93e5a939824f68380eb78a7a0ef5dbadfad2 100644
(file)
--- a/
BaseTinyFirmware/GCC/statefunc.h
+++ b/
BaseTinyFirmware/GCC/statefunc.h
@@
-10,14
+10,14
@@
* AVR458: Charging Li-Ion Batteries with BC100
\r
*
\r
* \par Documentation
\r
* 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
* 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
* $Name$
\r
* $Revision: 2261 $
\r
* $RCSfile$
\r
@@
-28,6
+28,11
@@
#ifndef STATEFUNC_H
\r
#define STATEFUNC_H
\r
\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
\r
//******************************************************************************
\r
// Wanted SPI-mode
\r
@@
-36,7
+41,7
@@
#define SPIMODE 0
\r
\r
//! Sample on leading _falling_ edge, setup on trailing _rising_ edge.
\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
\r
\r
//******************************************************************************
\r
@@
-53,19
+58,19
@@
// Error-flag bit identifiers
\r
//******************************************************************************
\r
//! Wrong jumper settings.
\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
\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
\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
\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
\r
//! Battery couldn't be charged.
\r
-#define ERR_BATTERY_EXHAUSTED 0x10
\r
+#define ERR_BATTERY_EXHAUSTED 0x10
\r
\r
\r
//******************************************************************************
\r
\r
\r
//******************************************************************************
\r