Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 72e80282a9 | |||
| faec97f6a6 | |||
| 168315bb26 |
@@ -96,7 +96,7 @@ void app_main(void)
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
zh_160x_set_cursor(&lcd_160x_handle, 0, 0);
|
zh_160x_set_cursor(&lcd_160x_handle, 0, 0);
|
||||||
zh_160x_print_char(&lcd_160x_handle, "LCD 1602A");
|
zh_160x_print_char(&lcd_160x_handle, "LCD 160X");
|
||||||
zh_160x_set_cursor(&lcd_160x_handle, 1, 0);
|
zh_160x_set_cursor(&lcd_160x_handle, 1, 0);
|
||||||
zh_160x_print_char(&lcd_160x_handle, "Hello World!");
|
zh_160x_print_char(&lcd_160x_handle, "Hello World!");
|
||||||
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ extern "C"
|
|||||||
* @brief Sets the cursor to a specific position on the LCD.
|
* @brief Sets the cursor to a specific position on the LCD.
|
||||||
*
|
*
|
||||||
* @param[in] handle Pointer to unique PCF8574 handle.
|
* @param[in] handle Pointer to unique PCF8574 handle.
|
||||||
* @param[in] row The row number (0 or 1).
|
* @param[in] row The row number.
|
||||||
* @param[in] col The column number (0–15).
|
* @param[in] col The column number (0–15).
|
||||||
*
|
*
|
||||||
* @return ESP_OK if success or an error code otherwise.
|
* @return ESP_OK if success or an error code otherwise.
|
||||||
@@ -75,7 +75,7 @@ extern "C"
|
|||||||
* @brief Displays a progress bar on a specific row of the LCD.
|
* @brief Displays a progress bar on a specific row of the LCD.
|
||||||
*
|
*
|
||||||
* @param[in] handle Pointer to unique PCF8574 handle.
|
* @param[in] handle Pointer to unique PCF8574 handle.
|
||||||
* @param[in] row The row number (0 or 1).
|
* @param[in] row The row number.
|
||||||
* @param[in] progress The progress percentage (0–100).
|
* @param[in] progress The progress percentage (0–100).
|
||||||
*
|
*
|
||||||
* @return ESP_OK if success or an error code otherwise.
|
* @return ESP_OK if success or an error code otherwise.
|
||||||
@@ -86,7 +86,7 @@ extern "C"
|
|||||||
* @brief Clears a specific row on the LCD.
|
* @brief Clears a specific row on the LCD.
|
||||||
*
|
*
|
||||||
* @param[in] handle Pointer to unique PCF8574 handle.
|
* @param[in] handle Pointer to unique PCF8574 handle.
|
||||||
* @param[in] row The row number (0 or 1).
|
* @param[in] row The row number.
|
||||||
*
|
*
|
||||||
* @return ESP_OK if success or an error code otherwise.
|
* @return ESP_OK if success or an error code otherwise.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
3.0.0
|
3.0.1
|
||||||
@@ -22,9 +22,9 @@ static const char *TAG = "zh_160x_i2c";
|
|||||||
|
|
||||||
#define LCD_160X_PULSE \
|
#define LCD_160X_PULSE \
|
||||||
zh_pcf8574_write_gpio(handle, 2, true); \
|
zh_pcf8574_write_gpio(handle, 2, true); \
|
||||||
esp_delay_us(300); \
|
esp_delay_us(500); \
|
||||||
zh_pcf8574_write_gpio(handle, 2, false); \
|
zh_pcf8574_write_gpio(handle, 2, false); \
|
||||||
esp_delay_us(400);
|
esp_delay_us(500);
|
||||||
|
|
||||||
static void _zh_160x_lcd_init(zh_pcf8574_handle_t *handle);
|
static void _zh_160x_lcd_init(zh_pcf8574_handle_t *handle);
|
||||||
static void _zh_160x_send_command(zh_pcf8574_handle_t *handle, uint8_t command);
|
static void _zh_160x_send_command(zh_pcf8574_handle_t *handle, uint8_t command);
|
||||||
|
|||||||
Reference in New Issue
Block a user