2020-02-17 18:04:38 +01:00
|
|
|
/** library to drive vacuum fluorescent display using supertex HV518 shift register VFD drivers
|
2016-08-14 20:18:10 +02:00
|
|
|
* @details the current configuration is for a VFD extracted from a Samsung SER-6500 cash register
|
2020-01-03 00:16:59 +01:00
|
|
|
* @file
|
2016-08-14 20:18:10 +02:00
|
|
|
* @author King Kévin <kingkevin@cuvoodoo.info>
|
2020-06-06 14:35:55 +02:00
|
|
|
* @copyright SPDX-License-Identifier: GPL-3.0-or-later
|
2020-02-17 18:04:38 +01:00
|
|
|
* @date 2016-2020
|
2020-01-03 00:16:59 +01:00
|
|
|
* @note peripherals used: SPI @ref vfd_hv518_spi , GPIO @ref vfd_hv518_gpio , timer @ref vfd_hv518_timer
|
2016-08-14 20:18:10 +02:00
|
|
|
*/
|
2020-02-17 18:04:38 +01:00
|
|
|
#pragma once
|
2020-11-24 15:56:00 +01:00
|
|
|
#error not converted for STM32F4
|
2016-01-28 21:21:50 +01:00
|
|
|
|
2016-08-14 20:18:10 +02:00
|
|
|
/** number HV518 VFD drivers */
|
2016-01-28 21:21:50 +01:00
|
|
|
#define VFD_DRIVERS 3
|
2016-08-14 20:18:10 +02:00
|
|
|
/** number of digits blocks on SER-6500 VFD */
|
2016-01-28 21:21:50 +01:00
|
|
|
#define VFD_DIGITS 10
|
2016-08-14 20:18:10 +02:00
|
|
|
/** number of dot matrix blocks on SER-6500 VFD */
|
2016-01-28 21:21:50 +01:00
|
|
|
#define VFD_MATRIX 12
|
|
|
|
|
2016-08-14 20:18:10 +02:00
|
|
|
/** set character to digit block
|
|
|
|
* @param[in] nb digit block to set
|
|
|
|
* @param[in] c ASCII character to set
|
|
|
|
* @note use the MSB of @p nb to enable the dot
|
|
|
|
*/
|
2016-01-28 21:21:50 +01:00
|
|
|
void vfd_digit(uint8_t nb, char c);
|
2016-08-14 20:18:10 +02:00
|
|
|
/** set character to matrix block
|
|
|
|
* @param[in] nb matrix block to set
|
|
|
|
* @param[in] c ASCII character to set
|
|
|
|
* @note on ASCII characters are used for pictures
|
|
|
|
*/
|
2016-01-28 21:21:50 +01:00
|
|
|
void vfd_matrix(uint8_t nb, char c);
|
2016-08-14 20:18:10 +02:00
|
|
|
/** clear VFD display */
|
2016-01-28 21:21:50 +01:00
|
|
|
void vfd_clear(void);
|
2016-08-14 20:18:10 +02:00
|
|
|
/** test VFD display (light up all segments) */
|
2016-01-28 21:21:50 +01:00
|
|
|
void vfd_test(void);
|
2016-08-14 20:18:10 +02:00
|
|
|
/** switch VFD on */
|
2016-01-28 21:21:50 +01:00
|
|
|
void vfd_on(void);
|
2016-08-14 20:18:10 +02:00
|
|
|
/** switch VFD display off */
|
2016-01-28 21:21:50 +01:00
|
|
|
void vfd_off(void);
|
2016-08-14 20:18:10 +02:00
|
|
|
/** setup VFD */
|
2016-01-28 21:21:50 +01:00
|
|
|
void vfd_setup(void);
|