Merge branch 'master' of gitorious.ghostdub.de:avr/thermocouple

Conflicts:
	firmware/masterchip/spi_proto.h
	firmware/slavechip/spi_proto.c
master
Nidan 15 years ago
commit 0f3b2b76db

@ -1,7 +1,5 @@
#define SPI_BAUDRATE 1000000
#ifdef SPI_MASTER
#undef SPI_MASTER
#endif //SPI_MASTER
//#define SPI_SS_PORT D
//#define SPI_SS_PIN 7
#define SPI_MASTER
#define SPI_SS_PORT D
#define SPI_SS_PIN 7

@ -9,19 +9,6 @@
#include <spi.h>
uint16_t *spi_proto_globals8[] = {
&foo
};
uint8_t *spi_proto_globals16[] = {
&bar
};
funptr_t spi_proto_funcs[] = {
&baz
};
/* SPI framework.
*
* currently alpha, uses interrupts, single master/single slave operation
@ -116,6 +103,7 @@ void spi_mst_read(uint8_t len, uint8_t *data){
}
#ifndef SPI_MASTER
void __attribute__((always_inline)) spi_sla_handle_packet(){
// TODO: make slave not hangup in case of partial read
@ -144,7 +132,6 @@ void __attribute__((always_inline)) spi_sla_handle_packet(){
}
}
#ifndef SPI_MASTER
ISR(SPI_vect){
SPCR &= ~(_BV(SPIE)); //disable spi interrupts
spi_sla_handle_packet();

@ -1,5 +1,7 @@
#define SPI_BAUDRATE 1000000
#define SPI_MASTER
#define SPI_SS_PORT D
#define SPI_SS_PIN 7
#ifdef SPI_MASTER
#undef SPI_MASTER
#endif //SPI_MASTER
//#define SPI_SS_PORT D
//#define SPI_SS_PIN 7

Loading…
Cancel
Save