X-Git-Url: http://git.droids-corp.org/?p=protos%2Fxbee-avr.git;a=blobdiff_plain;f=spi_servo.c;h=59a0810463748b10a232b47345bac15c572f5e31;hp=fad6866ea25dda2407a712d1d8992a8ca7b6879f;hb=57895b3bb2fe0582c589685b7df34f3968b346ec;hpb=9a9b64112aee5ab26398b46cb13b7e49c292a355 diff --git a/spi_servo.c b/spi_servo.c index fad6866..59a0810 100644 --- a/spi_servo.c +++ b/spi_servo.c @@ -38,12 +38,13 @@ static volatile union { }; } byte1; +#define SS_HIGH() PORTB |= (1 << 4) +#define SS_LOW() PORTB &= (~(1 << 4)) + void spi_servo_init(void) { - /* real SS ! */ - DDRK = 0x2; /* SCK, SS & MOSI */ - DDRB = 0x7; + DDRB = 0xb0; /* remove power reduction on spi */ PRR0 &= ~(1 << PRSPI); @@ -51,7 +52,7 @@ void spi_servo_init(void) /* Enable SPI, Master, set clock rate fck/64 */ SPCR = (1<