⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 alt_up_character_lcd.h

📁 这是一个 NIOSII系统的 1602LCD 控制IP核
💻 H
字号:
#ifndef __ALT_UP_CHARACTER_LCD_H__
#define __ALT_UP_CHARACTER_LCD_H__

#include <stddef.h>
#include <alt_types.h>

/**
 * @brief Initialize the LCD by clearing its display
 **/
void alt_up_character_lcd_init();

/**
 * @brief Write the characters in the buffer pointed to by <em> ptr </em> to the LCD, starting from where the current cursor points to 
 *
 * @param ptr  -- the pointer to the char buffer
 * @param len  -- the length of the char buffer
 *
 * @return 0 for success
 **/
int alt_up_character_lcd_write(const char *ptr, unsigned len);

/**
 * @brief Shift the cursor to left or right
 *
 * @param x_right_shift_offset  -- the number of spaces to shift to the right. If the offset is
 * negative, then the cursor shifts to the left.
 *
 * @return 0 for success
 **/
int alt_up_character_lcd_shift_cursor(int x_right_shift_offset);

/**
 * @brief Shift the entire display to left or right
 *
 * @param x_right_shift_offset  -- the number of spaces to shift to the right. If the offset is
 * negative, then the display shifts to the left.
 *
 * @return 0 for success
 **/
int alt_up_character_lcd_shift_display(int x_right_shift_offset);

/**
 * @brief Set the cursor position
 *
 * @param x_pos   -- x coordinate ( 0 to 15, from left to right )
 * @param y_pos   -- y coordinate ( 1 for the first row, 2 for the second row )
 *
 * @return 0 for success
 **/
int alt_up_character_lcd_set_cursor_pos(unsigned x_pos, unsigned y_pos);

/**
 * @brief Erase the character at the specified coordinate 
 *
 * @param x_pos   -- x coordinate ( 0 to 15, from left to right )
 * @param y_pos   -- y coordinate ( 1 for the first row, 2 for the second row )
 *
 * @return 0 for success
 **/
int alt_up_character_lcd_erase_pos(unsigned x_pos, unsigned y_pos);


#endif /* __ALT_UP_CHARACTER_LCD_H__ */


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -