Compare commits
4 Commits
master
...
e2f55b4284
| Author | SHA1 | Date | |
|---|---|---|---|
| e2f55b4284 | |||
| e9dae2fdee | |||
|
|
f473da9c3f | ||
|
|
3828826957 |
3676
io-helper.c
3676
io-helper.c
File diff suppressed because it is too large
Load Diff
16
io-helper.h
16
io-helper.h
@@ -1,23 +1,21 @@
|
|||||||
#ifndef _IO_HELPER_
|
#ifndef _IO_HELPER_
|
||||||
#define _IO_HELPER_
|
#define _IO_HELPER_
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <avr/io.h>
|
||||||
|
|
||||||
extern volatile uint8_t outStates[4];
|
#define nrOfOutputs 32 //must be multiple of 8
|
||||||
extern volatile uint8_t inStates[4];
|
#define nrOfInputs 32 //must be multiple of 8
|
||||||
extern volatile uint8_t ioHelperDebounceTable[32];
|
|
||||||
extern volatile uint8_t oldInstates[4];
|
|
||||||
extern volatile uint8_t inStatesBothEdges[4];
|
|
||||||
extern volatile uint8_t inStatesRisingEdge[4];
|
|
||||||
extern volatile uint8_t inStatesFallingEdge[4];
|
|
||||||
|
|
||||||
|
extern volatile uint8_t outStates[nrOfOutputs/8];
|
||||||
|
extern volatile uint8_t inStates[nrOfInputs/8];
|
||||||
|
extern volatile uint8_t ioHelperDebounceTable[nrOfInputs];
|
||||||
void ioHelperSetOuts(void);
|
void ioHelperSetOuts(void);
|
||||||
void ioHelperReadPins(void);
|
void ioHelperReadPins(void);
|
||||||
void ioHelperIoConf(void);
|
void ioHelperIoConf(void);
|
||||||
void ioHelperSetBit(volatile uint8_t *list, uint8_t nr, uint8_t state);
|
void ioHelperSetBit(volatile uint8_t *list, uint8_t nr, uint8_t state);
|
||||||
unsigned char ioHelperReadBit(volatile uint8_t *list, uint8_t nr);
|
unsigned char ioHelperReadBit(volatile uint8_t *list, uint8_t nr);
|
||||||
void ioHelperDebounce(void);
|
void ioHelperDebounce(void);
|
||||||
void ioHelperEdgeDetector(void);
|
|
||||||
|
|
||||||
//Outputs
|
//Outputs
|
||||||
//Pin | Bit in outStates
|
//Pin | Bit in outStates
|
||||||
|
|||||||
Reference in New Issue
Block a user