![]() |
LibDriver ST7920
|
driver st7920 source file More...
#include "driver_st7920.h"Go to the source code of this file.
Functions | |
| uint8_t | st7920_init (st7920_handle_t *handle) |
| initialize the chip | |
| uint8_t | st7920_deinit (st7920_handle_t *handle) |
| close the chip | |
| uint8_t | st7920_write_point (st7920_handle_t *handle, uint8_t x, uint8_t y, uint8_t data) |
| write a point | |
| uint8_t | st7920_read_point (st7920_handle_t *handle, uint8_t x, uint8_t y, uint8_t *data) |
| read a point | |
| uint8_t | st7920_write_string (st7920_handle_t *handle, uint8_t x, uint8_t y, char *str) |
| show a string | |
| uint8_t | st7920_fill_rect (st7920_handle_t *handle, uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint8_t color) |
| fill a rectangle | |
| uint8_t | st7920_draw_picture (st7920_handle_t *handle, uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint8_t *img) |
| draw a picture | |
| uint8_t | st7920_draw_compress_picture (st7920_handle_t *handle, uint8_t left, uint8_t top, uint8_t right, uint8_t bottom, uint8_t *img) |
| draw a compressed picture | |
| uint8_t | st7920_display_clear (st7920_handle_t *handle) |
| clear the display | |
| uint8_t | st7920_return_home (st7920_handle_t *handle) |
| return the home | |
| uint8_t | st7920_set_entry_mode (st7920_handle_t *handle, st7920_display_shift_t shift, st7920_address_counter_mode_t mode) |
| set the entry mode | |
| uint8_t | st7920_set_display_control (st7920_handle_t *handle, st7920_bool_t display_on, st7920_bool_t cursor_on, st7920_bool_t character_blink_on) |
| set the display control | |
| uint8_t | st7920_set_display_shift_mode (st7920_handle_t *handle, st7920_display_shift_mode_t mode) |
| set the display shift mode | |
| uint8_t | st7920_set_function (st7920_handle_t *handle, st7920_interface_bus_bit_t bus_bit, st7920_command_mode_t mode) |
| set the function | |
| uint8_t | st7920_set_cgram_address (st7920_handle_t *handle, uint8_t addr) |
| set the cgram address | |
| uint8_t | st7920_set_ddram_address (st7920_handle_t *handle, uint8_t addr) |
| set the ddram address | |
| uint8_t | st7920_write_ram (st7920_handle_t *handle, uint8_t *data, uint8_t len) |
| write the ram | |
| uint8_t | st7920_set_standby (st7920_handle_t *handle) |
| terminate to the standby mode | |
| uint8_t | st7920_set_vertical_scroll (st7920_handle_t *handle, st7920_bool_t enable) |
| set the vertical scroll | |
| uint8_t | st7920_set_reverse_line (st7920_handle_t *handle, st7920_reverse_line_t l) |
| set the reverse line | |
| uint8_t | st7920_set_extended_function (st7920_handle_t *handle, st7920_interface_bus_bit_t bus_bit, st7920_command_mode_t mode, st7920_bool_t graphic_display_enable) |
| set the extended function | |
| uint8_t | st7920_set_scroll_address (st7920_handle_t *handle, uint8_t addr) |
| set the scroll address | |
| uint8_t | st7920_set_graphic_address (st7920_handle_t *handle, uint8_t vertical_addr, uint8_t horizontal_addr) |
| set the graphic address | |
| uint8_t | st7920_write_cmd (st7920_handle_t *handle, uint8_t cmd) |
| write command | |
| uint8_t | st7920_write_data (st7920_handle_t *handle, uint8_t data) |
| write data | |
| uint8_t | st7920_info (st7920_info_t *info) |
| get chip's information | |
driver st7920 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 |
|---|---|---|---|
| 2022/03/19 | 1.0 | Shifeng Li | first upload |
Definition in file driver_st7920.c.
| #define CHIP_NAME "Sitronix ST7920" |
| #define DRIVER_VERSION 1000 |
driver version
Definition at line 49 of file driver_st7920.c.
| #define MANUFACTURER_NAME "Sitronix" |
manufacturer name
Definition at line 43 of file driver_st7920.c.
| #define MAX_CURRENT 0.45f |
chip max current
Definition at line 46 of file driver_st7920.c.
| #define ST7920_CMD 0 |
| #define ST7920_CMD_BASIC_CURSOR_DISPLAY_CONTROL 0x10 |
cursor display control command
Definition at line 70 of file driver_st7920.c.
| #define ST7920_CMD_BASIC_DISPLAY_CLEAR 0x01 |
| #define ST7920_CMD_BASIC_DISPLAY_CONTROL 0x08 |
display control command
Definition at line 69 of file driver_st7920.c.
| #define ST7920_CMD_BASIC_ENTRY_MODE_SET 0x04 |
entry mode set command
Definition at line 68 of file driver_st7920.c.
| #define ST7920_CMD_BASIC_FUNCTION_SET 0x20 |
function set command
Definition at line 71 of file driver_st7920.c.
| #define ST7920_CMD_BASIC_RETURN_HOME 0x02 |
return home command
Definition at line 67 of file driver_st7920.c.
| #define ST7920_CMD_BASIC_SET_CGRAM 0x40 |
set cgram command
Definition at line 72 of file driver_st7920.c.
| #define ST7920_CMD_BASIC_SET_DDRAM 0x80 |
set ddram command
Definition at line 73 of file driver_st7920.c.
| #define ST7920_CMD_EXT_FUNCTION_SET 0x20 |
extended function command
Definition at line 77 of file driver_st7920.c.
| #define ST7920_CMD_EXT_REVERSE 0x04 |
reverse command
Definition at line 76 of file driver_st7920.c.
| #define ST7920_CMD_EXT_SCROLL_RAM_ADDRESS_SELECT 0x02 |
scroll or ram address select command
Definition at line 75 of file driver_st7920.c.
| #define ST7920_CMD_EXT_SET_GRAPHIC_DISPLAY_RAM_ADDRESS 0x80 |
set graphic display ram address command
Definition at line 79 of file driver_st7920.c.
| #define ST7920_CMD_EXT_SET_SCROLL_ADDRESS 0x40 |
set scroll address command
Definition at line 78 of file driver_st7920.c.
| #define ST7920_CMD_EXT_STANFBY 0x01 |
standby command
Definition at line 74 of file driver_st7920.c.
| #define ST7920_DATA 1 |
data type
Definition at line 55 of file driver_st7920.c.
| #define ST7920_READ 1 |
read type
Definition at line 61 of file driver_st7920.c.
| #define ST7920_WRITE 0 |
| #define SUPPLY_VOLTAGE_MAX 4.5f |
chip max supply voltage
Definition at line 45 of file driver_st7920.c.
| #define SUPPLY_VOLTAGE_MIN 2.7f |
chip min supply voltage
Definition at line 44 of file driver_st7920.c.
| #define TEMPERATURE_MAX 85.0f |
chip max operating temperature
Definition at line 48 of file driver_st7920.c.
| #define TEMPERATURE_MIN -30.0f |
chip min operating temperature
Definition at line 47 of file driver_st7920.c.