adjusted for submodules and c99

This commit is contained in:
2016-09-19 13:34:08 +02:00
parent 16b64e6c15
commit 25f272ec49
4 changed files with 95 additions and 4 deletions

24
src/gpioCfg.c Normal file
View File

@ -0,0 +1,24 @@
/*
* gpioCfg.c
*
* Created on: 29.08.2016
* Author: wn
*/
#include <msp430g2553.h>
#include "gpio.h"
tPinCfg pinCfg[PINS_END] = {
{PORT1, BIT7, PIN_OUT, LOW}, //A
{PORT1, BIT6, PIN_OUT, LOW}, //B
{PORT2, BIT1, PIN_OUT, LOW}, //C
{PORT2, BIT3, PIN_OUT, LOW}, //D
{PORT2, BIT4, PIN_OUT, LOW}, //E
{PORT2, BIT5, PIN_OUT, LOW}, //F
{PORT2, BIT2, PIN_OUT, LOW}, //G
{PORT2, BIT0, PIN_OUT, HIGH}, //0
{PORT1, BIT5, PIN_OUT, HIGH}, //1
{PORT1, BIT2, PIN_OUT, HIGH}, //2
{PORT1, BIT0, PIN_IN_PULLUP, LOW}, // BUTTON_1
{PORT1, BIT1, PIN_OUT, LOW}, // LED_1
};

31
src/gpioCfg.h Normal file
View File

@ -0,0 +1,31 @@
/*
* gpioCfg.h
*
* Created on: 18.09.2016
* Author: wn
*/
#ifndef GPIOCFG_H_
#define GPIOCFG_H_
#include "gpio.h"
typedef enum {
PINS_FIRST,
SEG_A = PINS_FIRST,
SEG_B,
SEG_C,
SEG_D,
SEG_E,
SEG_F,
SEG_G,
DIGIT_0,
DIGIT_1,
DIGIT_2,
BUTTON_1,
LED_1,
PINS_END
} tPin;
#endif /* GPIOCFG_H_ */

View File

@ -10,14 +10,14 @@
#include <stdint.h>
#include "time.h"
// #include "PontCoopScheduler.h"
#include "PontCoopScheduler.h"
volatile uint32_t timestamp;
ISR(TIMER0_A0, TA0_ISR) {
timestamp++;
// schUpdate();
schUpdate();
}
void timeInit() {