mirror of
https://github.com/Derisis13/AT-VFD.git
synced 2025-12-06 19:32:49 +01:00
* QA: re-separation into library files
* Feature: `set_ports()` for setting GP ports * Change: removal of `static` and `inline` keywords to enable going library
This commit is contained in:
18
PT6302.h
18
PT6302.h
@@ -5,7 +5,19 @@
|
||||
#ifndef _PT6302_H_
|
||||
#define _PT6302_H_
|
||||
|
||||
/* PT6302 timing constants, all in usec */
|
||||
static const uint8_t TCW = 1; //CLKB pulse width
|
||||
static const uint8_t TDOFF = 16; //Data processing time
|
||||
static const uint8_t DTCSH = 16; //time difference between tDOFF and tCSH
|
||||
static const uint8_t TPRZ = 100; //VDD rise time
|
||||
static const uint8_t TWRSTB = 1; //RSTB pulse width
|
||||
|
||||
enum pins {
|
||||
RSTpin = (1 << PC2),
|
||||
CSBpin = (1 << PB0),
|
||||
CLKBpin = (1 << PB6),
|
||||
DINpin = (1 << PB7),
|
||||
};
|
||||
|
||||
/* -------------------------------------------------------------
|
||||
* Initial setup for the VFD controller interface
|
||||
@@ -21,4 +33,10 @@ void PT6302_startup(void);
|
||||
void transmit_bytes (const uint8_t* payload, uint8_t size);
|
||||
|
||||
|
||||
/* ---------------------------------------------------------
|
||||
* Sets GP1 and GP2 to the values given in the function call
|
||||
* Handles the entire communication
|
||||
* --------------------------------------------------------- */
|
||||
void set_ports(uint8_t gp1, uint8_t gp2);
|
||||
|
||||
#endif //_PT6302_H_
|
||||
|
||||
Reference in New Issue
Block a user