bienxanh1901/xiao_round_display

uploaded 9 months ago
Xiao round display driver

readme

# XIAO ROUND DISPLAY Driver

[![Build examples](https://github.com/bienxanh1901/xiao_round_display/actions/workflows/build_example.yml/badge.svg)](https://github.com/bienxanh1901/xiao_round_display/actions/workflows/build_example.yml) [![Component Registry](https://components.espressif.com/components/bienxanh1901/xiao_round_display/badge.svg)](https://components.espressif.com/components/bienxanh1901/xiao_round_display)

This repository contains an ESP-IDF driver for a Xiao Round display module. This module uses GC9A01 controller for LCD and CST816S controller for touch screen. Refer [Xiao Documentation](https://wiki.seeedstudio.com/seeedstudio_round_display_usage/) for more detailed.


## Using the component

Run the following command in your ESP-IDF project to install this component:
```bash
idf.py add-dependency "bienxanh1901/xiao_round_display"
```

## Example

To run the provided example, create it as follows:

```bash
idf.py create-project-from-example "bienxanh1901/xiao_round_display:xiao-round-display-example"
```

Then build as usual:
```bash
cd xiao-round-display-example
idf.py build
```

And flash it to the board:
```bash
idf.py -p PORT flash monitor
```

The example uses show the hardware test for LCD, touch and SD card.

## License

This component is provided under Apache 2.0 license, see [LICENSE](LICENSE.md) file for details.

## Contributing

Please check [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.

api

# API Reference

## Header files

- [include/xiao_battery.h](#file-includexiao_batteryh)
- [include/xiao_round_display.h](#file-includexiao_round_displayh)
- [include/xiao_rtc.h](#file-includexiao_rtch)
- [include/xiao_sd_card.h](#file-includexiao_sd_cardh)

## File include/xiao_battery.h






## Functions

| Type | Name |
| ---: | :--- |
|  void | [**xiao\_round\_display\_battery\_ADC\_deinit**](#function-xiao_round_display_battery_adc_deinit) () <br>_Deinitialize the xiao round display battery ADC._ |
|  esp\_err\_t | [**xiao\_round\_display\_battery\_ADC\_init**](#function-xiao_round_display_battery_adc_init) () <br>_Initialize the xiao round display battery ADC._ |
|  int32\_t | [**xiao\_round\_display\_battery\_level\_read**](#function-xiao_round_display_battery_level_read) () <br>_Read the current battery level._ |



## Functions Documentation

### function `xiao_round_display_battery_ADC_deinit`

_Deinitialize the xiao round display battery ADC._
```c
void xiao_round_display_battery_ADC_deinit () 
```


**Returns:**

None.
### function `xiao_round_display_battery_ADC_init`

_Initialize the xiao round display battery ADC._
```c
esp_err_t xiao_round_display_battery_ADC_init () 
```


**Returns:**

esp\_err\_t ESP\_OK on success, otherwise on error.
### function `xiao_round_display_battery_level_read`

_Read the current battery level._
```c
int32_t xiao_round_display_battery_level_read () 
```


**Returns:**

battery level in %.


## File include/xiao_round_display.h

_lvgl porting for xiao round display module_

To use this driver:

* Initialize the driver with [**xiao\_round\_display\_init()**](#function-xiao_round_display_init)
* Deinitialize the driver with [**xiao\_round\_display\_deinit()**](#function-xiao_round_display_deinit)


## Functions

| Type | Name |
| ---: | :--- |
|  void | [**xiao\_round\_display\_deinit**](#function-xiao_round_display_deinit) () <br>_Deinitialize the xiao round display driver._ |
|  esp\_err\_t | [**xiao\_round\_display\_init**](#function-xiao_round_display_init) () <br>_Initialize the xiao round display driver._ |



## Functions Documentation

### function `xiao_round_display_deinit`

_Deinitialize the xiao round display driver._
```c
void xiao_round_display_deinit () 
```


**Returns:**

None
### function `xiao_round_display_init`

_Initialize the xiao round display driver._
```c
esp_err_t xiao_round_display_init () 
```


**Returns:**

esp\_err\_t ESP\_OK on success, otherwise on error.


## File include/xiao_rtc.h






## Functions

| Type | Name |
| ---: | :--- |
|  esp\_err\_t | [**xiao\_round\_display\_rtc\_get\_time**](#function-xiao_round_display_rtc_get_time) (struct tm \*time) <br>_Read the current rtc time._ |
|  esp\_err\_t | [**xiao\_round\_display\_rtc\_set\_time**](#function-xiao_round_display_rtc_set_time) (struct tm \*time) <br>_Set the time for rtc._ |



## Functions Documentation

### function `xiao_round_display_rtc_get_time`

_Read the current rtc time._
```c
esp_err_t xiao_round_display_rtc_get_time (
    struct tm *time
) 
```


**Returns:**

esp\_err\_t ESP\_OK on success, otherwise on error.
### function `xiao_round_display_rtc_set_time`

_Set the time for rtc._
```c
esp_err_t xiao_round_display_rtc_set_time (
    struct tm *time
) 
```


**Returns:**

esp\_err\_t ESP\_OK on success, otherwise on error.


## File include/xiao_sd_card.h






## Functions

| Type | Name |
| ---: | :--- |
|  void | [**xiao\_round\_display\_sd\_card\_deinit**](#function-xiao_round_display_sd_card_deinit) () <br>_Deinitialize the xiao round display SD card._ |
|  esp\_err\_t | [**xiao\_round\_display\_sd\_card\_init**](#function-xiao_round_display_sd_card_init) () <br>_Initialize the xiao round display SD card._ |



## Functions Documentation

### function `xiao_round_display_sd_card_deinit`

_Deinitialize the xiao round display SD card._
```c
void xiao_round_display_sd_card_deinit () 
```


**Returns:**

None.
### function `xiao_round_display_sd_card_init`

_Initialize the xiao round display SD card._
```c
esp_err_t xiao_round_display_sd_card_init () 
```


**Returns:**

esp\_err\_t ESP\_OK on success, otherwise on error.


Links

Supports all targets

Maintainer

  • Hai Pham <pthanhhaiai@gmail.com>

License: Apache-2.0

To add this component to your project, run:

idf.py add-dependency "bienxanh1901/xiao_round_display^2.0.0"

or download archive

Stats

  • Downloaded in total
    Downloaded in total 6 times
  • Downloaded this version
    This version: 5 times

Badge

bienxanh1901/xiao_round_display version: 2.0.0
|