![]() |
LibDriver SYN6658
|
driver syn6658 header file More...
#include <stdio.h>#include <stdint.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | syn6658_handle_s |
| syn6658 handle structure definition More... | |
| struct | syn6658_info_s |
| syn6658 information structure definition More... | |
Macros | |
| #define | SYN6658_BUSY_TIMEOUT 1000 |
| syn6658 timeout definition | |
| #define | SYN6658_SOUND_101 "sound101" |
| syn6658 sound enumeration definition | |
| #define | SYN6658_SOUND_102 "sound102" |
| #define | SYN6658_SOUND_103 "sound103" |
| #define | SYN6658_SOUND_104 "sound104" |
| #define | SYN6658_SOUND_105 "sound105" |
| #define | SYN6658_SOUND_106 "sound106" |
| #define | SYN6658_SOUND_107 "sound107" |
| #define | SYN6658_SOUND_108 "sound108" |
| #define | SYN6658_SOUND_109 "sound109" |
| #define | SYN6658_SOUND_110 "sound110" |
| #define | SYN6658_SOUND_111 "sound111" |
| #define | SYN6658_SOUND_112 "sound112" |
| #define | SYN6658_SOUND_113 "sound113" |
| #define | SYN6658_SOUND_114 "sound114" |
| #define | SYN6658_SOUND_115 "sound115" |
| #define | SYN6658_SOUND_116 "sound116" |
| #define | SYN6658_SOUND_117 "sound117" |
| #define | SYN6658_SOUND_118 "sound118" |
| #define | SYN6658_SOUND_119 "sound119" |
| #define | SYN6658_SOUND_120 "sound120" |
| #define | SYN6658_SOUND_121 "sound121" |
| #define | SYN6658_SOUND_122 "sound122" |
| #define | SYN6658_SOUND_123 "sound123" |
| #define | SYN6658_SOUND_124 "sound124" |
| #define | SYN6658_SOUND_201 "sound201" |
| #define | SYN6658_SOUND_202 "sound202" |
| #define | SYN6658_SOUND_203 "sound203" |
| #define | SYN6658_SOUND_204 "sound204" |
| #define | SYN6658_SOUND_205 "sound205" |
| #define | SYN6658_SOUND_206 "sound206" |
| #define | SYN6658_SOUND_207 "sound207" |
| #define | SYN6658_SOUND_208 "sound208" |
| #define | SYN6658_SOUND_209 "sound209" |
| #define | SYN6658_SOUND_210 "sound210" |
| #define | SYN6658_SOUND_211 "sound211" |
| #define | SYN6658_SOUND_212 "sound212" |
| #define | SYN6658_SOUND_213 "sound213" |
| #define | SYN6658_SOUND_214 "sound214" |
| #define | SYN6658_SOUND_215 "sound215" |
| #define | SYN6658_SOUND_216 "sound216" |
| #define | SYN6658_SOUND_217 "sound217" |
| #define | SYN6658_SOUND_218 "sound218" |
| #define | SYN6658_SOUND_219 "sound219" |
| #define | SYN6658_SOUND_301 "sound301" |
| #define | SYN6658_SOUND_302 "sound302" |
| #define | SYN6658_SOUND_303 "sound303" |
| #define | SYN6658_SOUND_304 "sound304" |
| #define | SYN6658_SOUND_305 "sound305" |
| #define | SYN6658_SOUND_306 "sound306" |
| #define | SYN6658_SOUND_307 "sound307" |
| #define | SYN6658_SOUND_308 "sound308" |
| #define | SYN6658_SOUND_309 "sound309" |
| #define | SYN6658_SOUND_310 "sound310" |
| #define | SYN6658_SOUND_311 "sound311" |
| #define | SYN6658_SOUND_312 "sound312" |
| #define | SYN6658_SOUND_313 "sound313" |
| #define | SYN6658_SOUND_314 "sound314" |
| #define | SYN6658_SOUND_315 "sound315" |
| #define | SYN6658_SOUND_316 "sound316" |
| #define | SYN6658_SOUND_317 "sound317" |
| #define | SYN6658_SOUND_318 "sound318" |
| #define | SYN6658_SOUND_319 "sound319" |
| #define | SYN6658_SOUND_401 "sound401" |
| #define | SYN6658_SOUND_402 "sound402" |
| #define | SYN6658_SOUND_403 "sound403" |
| #define | SYN6658_SOUND_404 "sound404" |
| #define | SYN6658_SOUND_405 "sound405" |
| #define | SYN6658_SOUND_406 "sound406" |
| #define | SYN6658_SOUND_407 "sound407" |
| #define | SYN6658_SOUND_408 "sound408" |
| #define | SYN6658_SOUND_501 "sound501" |
| #define | SYN6658_SOUND_502 "sound502" |
| #define | SYN6658_SOUND_503 "sound503" |
| #define | SYN6658_SOUND_504 "sound504" |
| #define | SYN6658_SOUND_505 "sound505" |
| #define | SYN6658_SOUND_506 "sound506" |
| #define | SYN6658_SOUND_507 "sound507" |
| #define | SYN6658_SOUND_601 "sound601" |
| #define | SYN6658_SOUND_602 "sound602" |
| #define | SYN6658_SOUND_701 "sound701" |
| #define | SYN6658_SOUND_702 "sound702" |
| #define | SYN6658_SOUND_703 "sound703" |
| #define | SYN6658_SOUND_704 "sound704" |
| #define | SYN6658_SOUND_705 "sound705" |
| #define | SYN6658_SOUND_706 "sound706" |
| #define | SYN6658_SOUND_707 "sound707" |
| #define | SYN6658_SOUND_708 "sound708" |
| #define | SYN6658_SOUND_709 "sound709" |
| #define | SYN6658_SOUND_710 "sound710" |
| #define | SYN6658_SOUND_711 "sound711" |
| #define | SYN6658_SOUND_712 "sound712" |
| #define | SYN6658_SOUND_713 "sound713" |
| #define | SYN6658_SOUND_714 "sound714" |
| #define | SYN6658_SOUND_715 "sound715" |
| #define | SYN6658_SOUND_716 "sound716" |
| #define | SYN6658_SOUND_717 "sound717" |
| #define | SYN6658_SOUND_718 "sound718" |
| #define | SYN6658_SOUND_719 "sound719" |
| #define | SYN6658_MESSAGE_A "msga" |
| syn6658 message enumeration definition | |
| #define | SYN6658_MESSAGE_B "msgb" |
| #define | SYN6658_MESSAGE_C "msgc" |
| #define | SYN6658_MESSAGE_D "msgd" |
| #define | SYN6658_MESSAGE_E "msge" |
| #define | SYN6658_MESSAGE_F "msgf" |
| #define | SYN6658_MESSAGE_G "msgg" |
| #define | SYN6658_MESSAGE_H "msgh" |
| #define | SYN6658_MESSAGE_I "msgi" |
| #define | SYN6658_MESSAGE_J "msgj" |
| #define | SYN6658_MESSAGE_K "msgk" |
| #define | SYN6658_MESSAGE_L "msgl" |
| #define | SYN6658_MESSAGE_M "msgm" |
| #define | SYN6658_MESSAGE_N "msgn" |
| #define | DRIVER_SYN6658_LINK_INIT(HANDLE, STRUCTURE) |
| initialize syn6658_handle_t structure | |
| #define | DRIVER_SYN6658_LINK_UART_INIT(HANDLE, FUC) |
| link uart_init function | |
| #define | DRIVER_SYN6658_LINK_UART_DEINIT(HANDLE, FUC) |
| link uart_deinit function | |
| #define | DRIVER_SYN6658_LINK_UART_READ(HANDLE, FUC) |
| link uart_read function | |
| #define | DRIVER_SYN6658_LINK_UART_WRITE(HANDLE, FUC) |
| link uart_write function | |
| #define | DRIVER_SYN6658_LINK_UART_FLUSH(HANDLE, FUC) |
| link uart_flush function | |
| #define | DRIVER_SYN6658_LINK_SPI_INIT(HANDLE, FUC) |
| link spi_init function | |
| #define | DRIVER_SYN6658_LINK_SPI_DEINIT(HANDLE, FUC) |
| link spi_deinit function | |
| #define | DRIVER_SYN6658_LINK_SPI_TRANSMIT(HANDLE, FUC) |
| link spi_transmit function | |
| #define | DRIVER_SYN6658_LINK_GPIO_READY_INIT(HANDLE, FUC) |
| link gpio_ready_init function | |
| #define | DRIVER_SYN6658_LINK_GPIO_READY_DEINIT(HANDLE, FUC) |
| link gpio_ready_deinit function | |
| #define | DRIVER_SYN6658_LINK_GPIO_READY_READ(HANDLE, FUC) |
| link gpio_ready_read function | |
| #define | DRIVER_SYN6658_LINK_DELAY_MS(HANDLE, FUC) |
| link delay_ms function | |
| #define | DRIVER_SYN6658_LINK_DEBUG_PRINT(HANDLE, FUC) |
| link debug_print function | |
Typedefs | |
| typedef struct syn6658_handle_s | syn6658_handle_t |
| syn6658 handle structure definition | |
| typedef struct syn6658_info_s | syn6658_info_t |
| syn6658 information structure definition | |
Enumerations | |
| enum | syn6658_interface_t { SYN6658_INTERFACE_UART = 0x00 , SYN6658_INTERFACE_SPI = 0x01 } |
| syn6658 interface enumeration definition More... | |
| enum | syn6658_type_t { SYN6658_TYPE_GB2312 = 0x00 , SYN6658_TYPE_GBK = 0x01 , SYN6658_TYPE_BIG5 = 0x02 , SYN6658_TYPE_UNICODE_LITTLE = 0x03 , SYN6658_TYPE_UNICODE_BIG = 0x04 } |
| syn6658 type enumeration definition More... | |
| enum | syn6658_status_t { SYN6658_STATUS_OK = 0x00 , SYN6658_STATUS_BUSY = 0x01 } |
| syn6658 status enumeration definition More... | |
| enum | syn6658_speaker_t { SYN6658_SPEAKER_XIAOLING = 3 , SYN6658_SPEAKER_YIXIAOJIAN = 51 , SYN6658_SPEAKER_YIXIAOQIANG = 52 , SYN6658_SPEAKER_TIANPEIPEI = 53 , SYN6658_SPEAKER_TANGLAOYA = 54 , SYN6658_SPEAKER_XIAOYANZI = 55 } |
| syn6658 speaker enumeration definition More... | |
Functions | |
| uint8_t | syn6658_info (syn6658_info_t *info) |
| get chip's information | |
| uint8_t | syn6658_set_interface (syn6658_handle_t *handle, syn6658_interface_t interface) |
| set the chip interface | |
| uint8_t | syn6658_get_interface (syn6658_handle_t *handle, syn6658_interface_t *interface) |
| get the chip interface | |
| uint8_t | syn6658_init (syn6658_handle_t *handle) |
| initialize the chip | |
| uint8_t | syn6658_deinit (syn6658_handle_t *handle) |
| close the chip | |
| uint8_t | syn6658_set_text_type (syn6658_handle_t *handle, syn6658_type_t type) |
| set the chip text type | |
| uint8_t | syn6658_get_text_type (syn6658_handle_t *handle, syn6658_type_t *type) |
| get the chip text type | |
| uint8_t | syn6658_synthesis_text (syn6658_handle_t *handle, const char *const fmt,...) |
| synthesis the test | |
| uint8_t | syn6658_get_status (syn6658_handle_t *handle, syn6658_status_t *status) |
| get the current status | |
| uint8_t | syn6658_stop (syn6658_handle_t *handle) |
| stop the chip | |
| uint8_t | syn6658_pause (syn6658_handle_t *handle) |
| pause the chip | |
| uint8_t | syn6658_resume (syn6658_handle_t *handle) |
| resume the chip | |
| uint8_t | syn6658_standby (syn6658_handle_t *handle) |
| set the chip to standby mode | |
| uint8_t | syn6658_wake_up (syn6658_handle_t *handle) |
| wake up the chip | |
| uint8_t | syn6658_set_synthesis_volume (syn6658_handle_t *handle, uint8_t volume) |
| set the chip synthesis volume | |
| uint8_t | syn6658_set_synthesis_speed (syn6658_handle_t *handle, uint8_t speed) |
| set the synthesis speed | |
| uint8_t | syn6658_set_synthesis_speaker (syn6658_handle_t *handle, syn6658_speaker_t speaker) |
| set the synthesis speaker | |
| uint8_t | syn6658_save_text (syn6658_handle_t *handle, uint8_t offset, char *text) |
| save text to the buffer | |
| uint8_t | syn6658_play_text (syn6658_handle_t *handle, uint8_t times, syn6658_type_t type) |
| play text | |
| uint8_t | syn6658_set_command (syn6658_handle_t *handle, uint8_t command, uint32_t timeout) |
| send the command to the chip | |
| uint8_t | syn6658_set_command_with_arg (syn6658_handle_t *handle, uint8_t command, uint8_t param, char *txt, uint32_t timeout) |
| send the command with arg to the chip | |
driver syn6658 header 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/08/30 | 1.0 | Shifeng Li | first upload |
Definition in file driver_syn6658.h.