forked from mohr/ArduinoIO
more stuff moved to cfg
This commit is contained in:
parent
8c5bb21d70
commit
78792e5d4a
@ -4,5 +4,6 @@
|
|||||||
#define BAUD_RATE 115200
|
#define BAUD_RATE 115200
|
||||||
#define SERIAL_RX_BUFFER_SIZE 256
|
#define SERIAL_RX_BUFFER_SIZE 256
|
||||||
#define RING_BUFFER_SIZE 100
|
#define RING_BUFFER_SIZE 100
|
||||||
|
#define MAX_PACKET_LENGTH 100
|
||||||
|
|
||||||
#endif /* ARDUINOCONFIG_H_ */
|
#endif /* ARDUINOCONFIG_H_ */
|
||||||
|
8
main.cpp
8
main.cpp
@ -15,10 +15,6 @@
|
|||||||
#define CS_PORT PORTC
|
#define CS_PORT PORTC
|
||||||
#define CS_DDR DDRC
|
#define CS_DDR DDRC
|
||||||
|
|
||||||
|
|
||||||
#define MAX_PACKET_LENGTH 100
|
|
||||||
|
|
||||||
|
|
||||||
static const uint8_t COMMAND_TRANSFER_SPI = 1;
|
static const uint8_t COMMAND_TRANSFER_SPI = 1;
|
||||||
|
|
||||||
SimpleRingBuffer ringBuffer(RING_BUFFER_SIZE, true);
|
SimpleRingBuffer ringBuffer(RING_BUFFER_SIZE, true);
|
||||||
@ -92,9 +88,7 @@ void handlePacket(uint8_t *packet, size_t packetLen) {
|
|||||||
//check reply:
|
//check reply:
|
||||||
Serial.println("Data response check: ");
|
Serial.println("Data response check: ");
|
||||||
for(size_t i =0; i< packetLen; i++){
|
for(size_t i =0; i< packetLen; i++){
|
||||||
Serial.print("packet nr ");
|
Serial.print("packet nr ");Serial.print(i);Serial.print(" ");
|
||||||
Serial.print(i);
|
|
||||||
Serial.print(" ");
|
|
||||||
Serial.println(packet[i]);
|
Serial.println(packet[i]);
|
||||||
}
|
}
|
||||||
sendData(packet, packetLen);
|
sendData(packet, packetLen);
|
||||||
|
Loading…
Reference in New Issue
Block a user