aboutsummaryrefslogtreecommitdiff
path: root/include/can
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-03-20 16:39:30 +0100
committerKarel Kočí <cynerd@email.cz>2016-03-20 16:39:30 +0100
commit9439c6f1caffd938673018f3af7460b33a12528e (patch)
tree55eb32bfb1f90a489982853f698619a2083a4285 /include/can
parent1ac3026c039cb15dd8c110c84215096854c3c804 (diff)
downloadavr-ioe-9439c6f1caffd938673018f3af7460b33a12528e.tar.gz
avr-ioe-9439c6f1caffd938673018f3af7460b33a12528e.tar.bz2
avr-ioe-9439c6f1caffd938673018f3af7460b33a12528e.zip
Another work progress
Diffstat (limited to 'include/can')
-rw-r--r--include/can/global.h20
-rw-r--r--include/can/mcp2515.h36
-rw-r--r--include/can/software.h9
3 files changed, 0 insertions, 65 deletions
diff --git a/include/can/global.h b/include/can/global.h
deleted file mode 100644
index 5d88fe6..0000000
--- a/include/can/global.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <stdint.h>
-
-#ifndef _IOE_CAN_GLOBAL_
-#define _IOE_CAN_GLOBAL_
-
-typedef struct {
- uint16_t id;
- uint8_t length;
- uint8_t data[8];
-} CanFrame;
-
-typedef struct {
- CanFrame **buffer;
- void *udata;
-} Can;
-
-
-void can_send(Can *can, CanFrame *frame);
-
-#endif /* _IOE_CAN_GLOBAL_ */
diff --git a/include/can/mcp2515.h b/include/can/mcp2515.h
deleted file mode 100644
index 59376f7..0000000
--- a/include/can/mcp2515.h
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <avr/io.h>
-#include <avr/interrupt.h>
-#include <stdint.h>
-
-#include "spi.h"
-#include "global.h"
-
-#ifndef _IOE_CAN_MCP2515_H_
-#define _IOE_CAN_MCP2515_H_
-#ifdef CONFIG_IOE_CAN_MCP2515
-#ifndef CONFIG_IOE_SPI
-#error "Please define CONFIG_IOE_SPI. MCP2515 requires SPI."
-#endif
-
-// TODO registers
-#define CAN_MCP2515_CANCTL
-// TODO buffers
-
-typedef struct {
- uint8_t group, mask;
-} CanMcp2515;
-
-int8_t can_mcp2515_init(CanMcp2515 * can, uint8_t group, uint8_t mask);
-
-void can_mcp2515_reset(CanMcp2515 * can);
-uint8_t can_mcp2515_read(CanMcp2515 * can, uint8_t address);
-uint8_t can_mcp2515_readrx(CanMcp2515 * can, uint8_t buffer);
-void can_mcp2515_write(CanMcp2515 * can, uint8_t address, uint8_t data);
-void can_mcp2515_loadrx(CanMcp2515 * can, uint8_t buffer, uint8_t data);
-uint8_t can_mcp2515_rdstat(CanMcp2515 * can);
-uint8_t can_mcp2515_rxstat(CanMcp2515 * can);
-void can_mcp2515_bitmod(CanMcp2515 * can, uint8_t address, uint8_t mask,
- uint8_t data);
-
-#endif /* CONFIG_IOE_CAN_MCP2515 */
-#endif /* _IOE_CAN_MCP2515_H_ */
diff --git a/include/can/software.h b/include/can/software.h
deleted file mode 100644
index b443e42..0000000
--- a/include/can/software.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <avr/io.h>
-#include <util/delay.h>
-#include <stdint.h>
-
-#ifndef _IOE_CAN_SOFTWARE_H_
-#define _IOE_CAN_SOFTWARE_H_
-
-
-#endif /* _IOE_CAN_SOFTWARE_H_ */