diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2011-10-13 20:33:30 +0200 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2011-10-13 20:33:30 +0200 |
commit | 5d9d373a959271b498710817d08c2ea8e153aa6e (patch) | |
tree | 6867e887454a850b4e15616000ef342a1c661c7e /firmware/common.h | |
parent | 35a36b0a6c69ce136fd6ea2a203d34e48e1291e8 (diff) | |
download | mini-octopus-5d9d373a959271b498710817d08c2ea8e153aa6e.tar.gz mini-octopus-5d9d373a959271b498710817d08c2ea8e153aa6e.zip |
correct firmware??
Diffstat (limited to 'firmware/common.h')
-rw-r--r-- | firmware/common.h | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/firmware/common.h b/firmware/common.h index 11716fb..3229718 100644 --- a/firmware/common.h +++ b/firmware/common.h @@ -31,46 +31,32 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef COMMON_H -#define COMMON_H - -#include <inttypes.h> -#include <stdbool.h> enum signals {PIN_NONE,PIN_IN,PIN_OUT,PIN_TRI, PIN_AD,PIN_RX,PIN_TX, PIN_SS,PIN_SCK,PIN_MISO,PIN_MOSI, PIN_SCL,PIN_SDA,PIN_PWM, - PIN_UART,PIN_CAN}; + PIN_UART}; -#ifdef __AVR_AT90CAN128__ - #define OCTOPUS_CAN -#endif -//#define OCTOPUS_RELAIS +#define OCTOPUS_CAN -#define DEBUG 1 +//#define DEBUG #define F_CPU 16000000UL #define STATUS_LED_PIN PB7 #define STATUS_LED_PORT PORTB /* red status led */ -#ifndef OCTOPUS_RELAIS #define STATUS_LED_on (STATUS_LED_PORT |= (1 << STATUS_LED_PIN)) #define STATUS_LED_off (STATUS_LED_PORT &= ~(1 << STATUS_LED_PIN)) -#else -#define STATUS_LED_on (1); -#define STATUS_LED_off (1); -#endif volatile struct octopus_t { volatile unsigned char latency_timer; - volatile unsigned char status_led; - uint8_t ports[43]; + int ports[45]; volatile char * msg[20]; volatile int datatogl; volatile unsigned int long_rx_cmd; @@ -85,7 +71,7 @@ volatile struct octopus_t void CommandAnswer(unsigned int length); -void CommandAnswerRest (void); +void CommandAnswerRest(void); void USBCommandRX(char *buf); void USBMessageIn(char *buf); @@ -105,4 +91,3 @@ void common_init(void); void common_hwdesc(void); -#endif //COMMON_H |