remove old port definitions and fix missing include

This commit is contained in:
Stefan Rupp 2014-03-18 01:14:19 +01:00
parent f2a4bb877c
commit 26209772e7
3 changed files with 2 additions and 21 deletions

View File

@ -45,35 +45,26 @@ static void write_data(uint16_t data, uint8_t le_clocks)
{
uint16_t mask = 0x8000;
int8_t bit;
//PORTC &= ~(1<<PC2);
SET_LE_L();
for (bit=15; bit>=le_clocks; bit--) {
//PORTC &= ~(1<<PC3);
SET_CLK_L();
if(data&mask) { SET_SDI_H(); }
else { SET_SDI_L(); }
//PORTC |= (1<<PC3);
SET_CLK_H();
mask >>= 1;
}
//PORTC |= (1<<PC2);
SET_LE_H();
for (/*noting to initialize*/; bit>=0; bit--) {
//PORTC &= ~(1<<PC3);
SET_CLK_L();
if(data&mask) { SET_SDI_H(); }
else { SET_SDI_L(); }
//PORTC |= (1<<PC3);
SET_CLK_H();
mask >>= 1;
}
//PORTC &= ~(1<<PC3);
SET_CLK_L();
//PORTC &= ~(1<<PC2);
SET_LE_L();
//PORTC &= ~(1<<PC4);
SET_SDI_L();
}
@ -122,17 +113,11 @@ void led1642gw_turn_all_off(void)
void led1642gw_init(void)
{
//PORTC &= ~(1<<PC3); // SCK
SET_CLK_L();
//PORTC &= ~(1<<PC4); // DATA
SET_SDI_L();
//PORTC &= ~(1<<PC2); // LE
SET_LE_L();
//DDRC |= (1<<PC3); // SCK
DDR_CLK |= (1<<PIN_CLK);
//DDRC |= (1<<PC4); // DATA
DDR_SDI |= (1<<PIN_SDI);
//DDRC |= (1<<PC2); // LE
DDR_LE |= (1<<PIN_LE);
memset(ledbuffer, 0x00, sizeof(ledbuffer));
led1642gw_flush();

View File

@ -1,14 +1,10 @@
#include "rgbyteclock.h"
#include "timer.h"
#include "rtc.h"
#include "lcd.h"
#include "ledcontroller.h"
void rgbyteclock(void)
{
while (1) {
led_set(0, 4000, 0, 0);

View File

@ -14,7 +14,7 @@
#define RGBYTECLOCK_H
#include <avr/io.h>
#include "ledcontroller.h"
void rgbyteclock(void);