LibDriver SYN6988  1.0.0
SYN6988 full-featured driver
driver_syn6988.h File Reference

driver syn6988 header file More...

#include <stdio.h>
#include <stdint.h>
#include <string.h>

Go to the source code of this file.

Data Structures

struct  syn6988_handle_s
 syn6988 handle structure definition More...
 
struct  syn6988_info_s
 syn6988 information structure definition More...
 

Macros

#define SYN6988_BUSY_TIMEOUT   1000
 syn6988 timeout definition More...
 
#define SYN6988_SOUND_101   "sound101"
 syn6988 sound enumeration definition More...
 
#define SYN6988_SOUND_102   "sound102"
 
#define SYN6988_SOUND_103   "sound103"
 
#define SYN6988_SOUND_104   "sound104"
 
#define SYN6988_SOUND_105   "sound105"
 
#define SYN6988_SOUND_106   "sound106"
 
#define SYN6988_SOUND_107   "sound107"
 
#define SYN6988_SOUND_108   "sound108"
 
#define SYN6988_SOUND_109   "sound109"
 
#define SYN6988_SOUND_110   "sound110"
 
#define SYN6988_SOUND_111   "sound111"
 
#define SYN6988_SOUND_112   "sound112"
 
#define SYN6988_SOUND_113   "sound113"
 
#define SYN6988_SOUND_114   "sound114"
 
#define SYN6988_SOUND_115   "sound115"
 
#define SYN6988_SOUND_116   "sound116"
 
#define SYN6988_SOUND_117   "sound117"
 
#define SYN6988_SOUND_118   "sound118"
 
#define SYN6988_SOUND_119   "sound119"
 
#define SYN6988_SOUND_120   "sound120"
 
#define SYN6988_SOUND_121   "sound121"
 
#define SYN6988_SOUND_122   "sound122"
 
#define SYN6988_SOUND_123   "sound123"
 
#define SYN6988_SOUND_124   "sound124"
 
#define SYN6988_SOUND_201   "sound201"
 
#define SYN6988_SOUND_202   "sound202"
 
#define SYN6988_SOUND_203   "sound203"
 
#define SYN6988_SOUND_204   "sound204"
 
#define SYN6988_SOUND_205   "sound205"
 
#define SYN6988_SOUND_206   "sound206"
 
#define SYN6988_SOUND_207   "sound207"
 
#define SYN6988_SOUND_208   "sound208"
 
#define SYN6988_SOUND_209   "sound209"
 
#define SYN6988_SOUND_301   "sound301"
 
#define SYN6988_SOUND_302   "sound302"
 
#define SYN6988_SOUND_303   "sound303"
 
#define SYN6988_SOUND_304   "sound304"
 
#define SYN6988_SOUND_305   "sound305"
 
#define SYN6988_SOUND_306   "sound306"
 
#define SYN6988_SOUND_307   "sound307"
 
#define SYN6988_SOUND_308   "sound308"
 
#define SYN6988_SOUND_309   "sound309"
 
#define SYN6988_SOUND_310   "sound310"
 
#define SYN6988_SOUND_311   "sound311"
 
#define SYN6988_SOUND_312   "sound312"
 
#define SYN6988_SOUND_313   "sound313"
 
#define SYN6988_SOUND_314   "sound314"
 
#define SYN6988_SOUND_315   "sound315"
 
#define SYN6988_SOUND_316   "sound316"
 
#define SYN6988_SOUND_317   "sound317"
 
#define SYN6988_SOUND_318   "sound318"
 
#define SYN6988_SOUND_401   "sound401"
 
#define SYN6988_SOUND_402   "sound402"
 
#define SYN6988_SOUND_403   "sound403"
 
#define SYN6988_SOUND_404   "sound404"
 
#define SYN6988_SOUND_405   "sound405"
 
#define SYN6988_SOUND_406   "sound406"
 
#define SYN6988_SOUND_407   "sound407"
 
#define SYN6988_SOUND_408   "sound408"
 
#define DRIVER_SYN6988_LINK_INIT(HANDLE, STRUCTURE)   memset(HANDLE, 0, sizeof(STRUCTURE))
 initialize syn6988_handle_t structure More...
 
#define DRIVER_SYN6988_LINK_UART_INIT(HANDLE, FUC)   (HANDLE)->uart_init = FUC
 link uart_init function More...
 
#define DRIVER_SYN6988_LINK_UART_DEINIT(HANDLE, FUC)   (HANDLE)->uart_deinit = FUC
 link uart_deinit function More...
 
#define DRIVER_SYN6988_LINK_UART_READ(HANDLE, FUC)   (HANDLE)->uart_read = FUC
 link uart_read function More...
 
#define DRIVER_SYN6988_LINK_UART_WRITE(HANDLE, FUC)   (HANDLE)->uart_write = FUC
 link uart_write function More...
 
#define DRIVER_SYN6988_LINK_UART_FLUSH(HANDLE, FUC)   (HANDLE)->uart_flush = FUC
 link uart_flush function More...
 
#define DRIVER_SYN6988_LINK_SPI_INIT(HANDLE, FUC)   (HANDLE)->spi_init = FUC
 link spi_init function More...
 
#define DRIVER_SYN6988_LINK_SPI_DEINIT(HANDLE, FUC)   (HANDLE)->spi_deinit = FUC
 link spi_deinit function More...
 
#define DRIVER_SYN6988_LINK_SPI_TRANSMIT(HANDLE, FUC)   (HANDLE)->spi_transmit = FUC
 link spi_transmit function More...
 
#define DRIVER_SYN6988_LINK_GPIO_READY_INIT(HANDLE, FUC)   (HANDLE)->gpio_ready_init = FUC
 link gpio_ready_init function More...
 
#define DRIVER_SYN6988_LINK_GPIO_READY_DEINIT(HANDLE, FUC)   (HANDLE)->gpio_ready_deinit = FUC
 link gpio_ready_deinit function More...
 
#define DRIVER_SYN6988_LINK_GPIO_READY_READ(HANDLE, FUC)   (HANDLE)->gpio_ready_read = FUC
 link gpio_ready_read function More...
 
#define DRIVER_SYN6988_LINK_DELAY_MS(HANDLE, FUC)   (HANDLE)->delay_ms = FUC
 link delay_ms function More...
 
#define DRIVER_SYN6988_LINK_DEBUG_PRINT(HANDLE, FUC)   (HANDLE)->debug_print = FUC
 link debug_print function More...
 

Typedefs

typedef struct syn6988_handle_s syn6988_handle_t
 syn6988 handle structure definition More...
 
typedef struct syn6988_info_s syn6988_info_t
 syn6988 information structure definition More...
 

Enumerations

enum  syn6988_interface_t { SYN6988_INTERFACE_UART = 0x00 , SYN6988_INTERFACE_SPI = 0x01 }
 syn6988 interface enumeration definition More...
 
enum  syn6988_type_t {
  SYN6988_TYPE_GB2312 = 0x00 , SYN6988_TYPE_GBK = 0x01 , SYN6988_TYPE_BIG5 = 0x02 , SYN6988_TYPE_UNICODE_LITTLE = 0x03 ,
  SYN6988_TYPE_UNICODE_BIG = 0x04
}
 syn6988 type enumeration definition More...
 
enum  syn6988_status_t { SYN6988_STATUS_OK = 0x00 , SYN6988_STATUS_BUSY = 0x01 }
 syn6988 status enumeration definition More...
 
enum  syn6988_language_t { SYN6988_LANGUAGE_AUTO = 0 , SYN6988_LANGUAGE_CHINESE = 1 , SYN6988_LANGUAGE_ENGLISH = 2 }
 syn6988 language enumeration definition More...
 

Functions

uint8_t syn6988_info (syn6988_info_t *info)
 get chip's information More...
 
uint8_t syn6988_set_interface (syn6988_handle_t *handle, syn6988_interface_t interface)
 set the chip interface More...
 
uint8_t syn6988_get_interface (syn6988_handle_t *handle, syn6988_interface_t *interface)
 get the chip interface More...
 
uint8_t syn6988_init (syn6988_handle_t *handle)
 initialize the chip More...
 
uint8_t syn6988_deinit (syn6988_handle_t *handle)
 close the chip More...
 
uint8_t syn6988_set_text_type (syn6988_handle_t *handle, syn6988_type_t type)
 set the chip text type More...
 
uint8_t syn6988_get_text_type (syn6988_handle_t *handle, syn6988_type_t *type)
 get the chip text type More...
 
uint8_t syn6988_synthesis_text (syn6988_handle_t *handle, const char *const fmt,...)
 synthesis the test More...
 
uint8_t syn6988_get_status (syn6988_handle_t *handle, syn6988_status_t *status)
 get the current status More...
 
uint8_t syn6988_stop (syn6988_handle_t *handle)
 stop the chip More...
 
uint8_t syn6988_pause (syn6988_handle_t *handle)
 pause the chip More...
 
uint8_t syn6988_resume (syn6988_handle_t *handle)
 resume the chip More...
 
uint8_t syn6988_standby (syn6988_handle_t *handle)
 set the chip to standby mode More...
 
uint8_t syn6988_wake_up (syn6988_handle_t *handle)
 wake up the chip More...
 
uint8_t syn6988_set_synthesis_volume (syn6988_handle_t *handle, uint8_t volume)
 set the chip synthesis volume More...
 
uint8_t syn6988_set_synthesis_speed (syn6988_handle_t *handle, uint8_t speed)
 set the synthesis speed More...
 
uint8_t syn6988_set_synthesis_language (syn6988_handle_t *handle, syn6988_language_t language)
 set synthesis language More...
 
uint8_t syn6988_set_command (syn6988_handle_t *handle, uint8_t command, uint32_t timeout)
 send the command to the chip More...
 
uint8_t syn6988_set_command_with_arg (syn6988_handle_t *handle, uint8_t command, uint8_t param, char *txt, uint32_t timeout)
 send the command with arg to the chip More...
 

Detailed Description

driver syn6988 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.

Version
1.0.0
Author
Shifeng Li
Date
2024-08-30

history

Date Version Author Description
2024/08/30 1.0 Shifeng Li first upload

Definition in file driver_syn6988.h.