summaryrefslogtreecommitdiff
path: root/firmware/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/common.h')
-rw-r--r--firmware/common.h25
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