move defines from header to source. no need to share them
This commit is contained in:
parent
465aaa9bb8
commit
20538ae13b
30
lib/vfd.c
30
lib/vfd.c
@ -31,6 +31,36 @@
|
||||
/* get the length of an array */
|
||||
#define LENGTH(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
/* supertex HV518 VFD driver pins */
|
||||
/* port on which the pins to control the supertex HV518 VFD driver are
|
||||
* we use port A because of the SPI interface */
|
||||
#define VFD_PORT GPIOA
|
||||
#define VFD_PORT_RCC RCC_GPIOA
|
||||
/* SPI port to use */
|
||||
#define VFD_SPI SPI1
|
||||
#if (VFD_SPI==SPI1)
|
||||
#define VFD_SPI_RCC RCC_SPI1
|
||||
#define VFD_SPI_IRQ NVIC_SPI1_IRQ
|
||||
#elif (VFD_SPI==SPI2)
|
||||
#define VFD_SPI_RCC RCC_SPI2
|
||||
#define VFD_SPI_IRQ NVIC_SPI2_IRQ
|
||||
#endif
|
||||
/* strobe pin to enable high voltage output
|
||||
* high voltage is output on low
|
||||
* drive using a GPIO PA6 (normally MISO) */
|
||||
#define VFD_STR GPIO6
|
||||
/* latch enable pin
|
||||
* store the shifted data on low
|
||||
* output the parallel data on high
|
||||
* use GPIO (PA4) (NSS does not work as SS) */
|
||||
#define VFD_NLE GPIO4
|
||||
/* clock signal
|
||||
* drive using SPI SCK (PA5) */
|
||||
#define VFD_CLK GPIO_SPI1_SCK
|
||||
/* data input, where the data is shifted to
|
||||
* drive using SPI MOSI (PA7) */
|
||||
#define VFD_DIN GPIO_SPI1_MOSI
|
||||
|
||||
/* ASCII characters encoded for 7 segments display
|
||||
* starts with space
|
||||
*/
|
||||
|
30
lib/vfd.h
30
lib/vfd.h
@ -16,36 +16,6 @@
|
||||
/* this library is used to drive the vacuum fluorescent display extracted from a Samsung SER-6500 cashier machine
|
||||
* it used three chained supertex HV518P shift register VFD drivers */
|
||||
|
||||
/* supertex HV518 VFD driver pins */
|
||||
/* port on which the pins to control the supertex HV518 VFD driver are
|
||||
* we use port A because of the SPI interface */
|
||||
#define VFD_PORT GPIOA
|
||||
#define VFD_PORT_RCC RCC_GPIOA
|
||||
/* SPI port to use */
|
||||
#define VFD_SPI SPI1
|
||||
#if (VFD_SPI==SPI1)
|
||||
#define VFD_SPI_RCC RCC_SPI1
|
||||
#define VFD_SPI_IRQ NVIC_SPI1_IRQ
|
||||
#elif (VFD_SPI==SPI2)
|
||||
#define VFD_SPI_RCC RCC_SPI2
|
||||
#define VFD_SPI_IRQ NVIC_SPI2_IRQ
|
||||
#endif
|
||||
/* strobe pin to enable high voltage output
|
||||
* high voltage is output on low
|
||||
* drive using a GPIO PA6 (normally MISO) */
|
||||
#define VFD_STR GPIO6
|
||||
/* latch enable pin
|
||||
* store the shifted data on low
|
||||
* output the parallel data on high
|
||||
* use GPIO (PA4) (NSS does not work as SS) */
|
||||
#define VFD_NLE GPIO4
|
||||
/* clock signal
|
||||
* drive using SPI SCK (PA5) */
|
||||
#define VFD_CLK GPIO_SPI1_SCK
|
||||
/* data input, where the data is shifted to
|
||||
* drive using SPI MOSI (PA7) */
|
||||
#define VFD_DIN GPIO_SPI1_MOSI
|
||||
|
||||
/* the number of blocks available on the VFD */
|
||||
#define VFD_DRIVERS 3
|
||||
#define VFD_DIGITS 10
|
||||
|
Loading…
Reference in New Issue
Block a user