![]() |
LibDriver TM1638
|
driver tm1638 source file More...
#include "driver_tm1638.h"Go to the source code of this file.
Macros | |
| #define | CHIP_NAME "Titan Micro Electronics TM1638" |
| chip information definition | |
| #define | MANUFACTURER_NAME "Titan Micro Electronics" |
| #define | SUPPLY_VOLTAGE_MIN 3.0f |
| #define | SUPPLY_VOLTAGE_MAX 6.0f |
| #define | MAX_CURRENT 200.0f |
| #define | TEMPERATURE_MIN -40.0f |
| #define | TEMPERATURE_MAX 125.0f |
| #define | DRIVER_VERSION 1000 |
| #define | TM1638_COMMAND_DATA (1 << 6) |
| chip command definition | |
| #define | TM1638_COMMAND_DISPLAY (2 << 6) |
| #define | TM1638_COMMAND_ADDRESS (3 << 6) |
Functions | |
| uint8_t | tm1638_init (tm1638_handle_t *handle) |
| initialize the chip | |
| uint8_t | tm1638_deinit (tm1638_handle_t *handle) |
| close the chip | |
| uint8_t | tm1638_set_pulse_width (tm1638_handle_t *handle, tm1638_pulse_width_t width) |
| set pulse width | |
| uint8_t | tm1638_get_pulse_width (tm1638_handle_t *handle, tm1638_pulse_width_t *width) |
| get pulse width | |
| uint8_t | tm1638_set_display (tm1638_handle_t *handle, tm1638_bool_t enable) |
| enable or disable display | |
| uint8_t | tm1638_get_display (tm1638_handle_t *handle, tm1638_bool_t *enable) |
| get display status | |
| uint8_t | tm1638_set_address_mode (tm1638_handle_t *handle, tm1638_address_mode_t mode) |
| set address mode | |
| uint8_t | tm1638_get_address_mode (tm1638_handle_t *handle, tm1638_address_mode_t *mode) |
| get address mode | |
| uint8_t | tm1638_set_test_mode (tm1638_handle_t *handle, tm1638_bool_t enable) |
| enable or disable test mode | |
| uint8_t | tm1638_get_test_mode (tm1638_handle_t *handle, tm1638_bool_t *enable) |
| get test mode status | |
| uint8_t | tm1638_clear_segment (tm1638_handle_t *handle) |
| clear segment | |
| uint8_t | tm1638_write_segment (tm1638_handle_t *handle, uint8_t addr, uint16_t *data, uint8_t len) |
| write segment | |
| uint8_t | tm1638_read_segment (tm1638_handle_t *handle, uint8_t segk[4]) |
| read segment | |
| uint8_t | tm1638_set_reg (tm1638_handle_t *handle, uint8_t cmd, uint8_t *data, uint8_t len) |
| set the chip register | |
| uint8_t | tm1638_get_reg (tm1638_handle_t *handle, uint8_t cmd, uint8_t *data, uint8_t len) |
| get the chip register | |
| uint8_t | tm1638_info (tm1638_info_t *info) |
| get chip's information | |
driver tm1638 source file
Copyright (c) 2015 - present LibDriver All rights reserved
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Date | Version | Author | Description |
|---|---|---|---|
| 2024/03/31 | 1.0 | Shifeng Li | first upload |
Definition in file driver_tm1638.c.
| #define CHIP_NAME "Titan Micro Electronics TM1638" |
| #define DRIVER_VERSION 1000 |
driver version
Definition at line 49 of file driver_tm1638.c.
| #define MANUFACTURER_NAME "Titan Micro Electronics" |
manufacturer name
Definition at line 43 of file driver_tm1638.c.
| #define MAX_CURRENT 200.0f |
chip max current
Definition at line 46 of file driver_tm1638.c.
| #define SUPPLY_VOLTAGE_MAX 6.0f |
chip max supply voltage
Definition at line 45 of file driver_tm1638.c.
| #define SUPPLY_VOLTAGE_MIN 3.0f |
chip min supply voltage
Definition at line 44 of file driver_tm1638.c.
| #define TEMPERATURE_MAX 125.0f |
chip max operating temperature
Definition at line 48 of file driver_tm1638.c.
| #define TEMPERATURE_MIN -40.0f |
chip min operating temperature
Definition at line 47 of file driver_tm1638.c.
| #define TM1638_COMMAND_ADDRESS (3 << 6) |
address command setting
Definition at line 56 of file driver_tm1638.c.
| #define TM1638_COMMAND_DATA (1 << 6) |
| #define TM1638_COMMAND_DISPLAY (2 << 6) |
display and control command setting
Definition at line 55 of file driver_tm1638.c.