LibDriver SYN6988  1.0.0
SYN6988 full-featured driver
syn6988 base driver function

syn6988 base driver modules More...

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"
 

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

Detailed Description

syn6988 base driver modules

Macro Definition Documentation

◆ SYN6988_BUSY_TIMEOUT

#define SYN6988_BUSY_TIMEOUT   1000

syn6988 timeout definition

1000ms

Definition at line 63 of file driver_syn6988.h.

◆ SYN6988_SOUND_101

#define SYN6988_SOUND_101   "sound101"

syn6988 sound enumeration definition

sound101

Definition at line 69 of file driver_syn6988.h.

◆ SYN6988_SOUND_102

#define SYN6988_SOUND_102   "sound102"

sound102

Definition at line 70 of file driver_syn6988.h.

◆ SYN6988_SOUND_103

#define SYN6988_SOUND_103   "sound103"

sound103

Definition at line 71 of file driver_syn6988.h.

◆ SYN6988_SOUND_104

#define SYN6988_SOUND_104   "sound104"

sound104

Definition at line 72 of file driver_syn6988.h.

◆ SYN6988_SOUND_105

#define SYN6988_SOUND_105   "sound105"

sound105

Definition at line 73 of file driver_syn6988.h.

◆ SYN6988_SOUND_106

#define SYN6988_SOUND_106   "sound106"

sound106

Definition at line 74 of file driver_syn6988.h.

◆ SYN6988_SOUND_107

#define SYN6988_SOUND_107   "sound107"

sound107

Definition at line 75 of file driver_syn6988.h.

◆ SYN6988_SOUND_108

#define SYN6988_SOUND_108   "sound108"

sound108

Definition at line 76 of file driver_syn6988.h.

◆ SYN6988_SOUND_109

#define SYN6988_SOUND_109   "sound109"

sound109

Definition at line 77 of file driver_syn6988.h.

◆ SYN6988_SOUND_110

#define SYN6988_SOUND_110   "sound110"

sound110

Definition at line 78 of file driver_syn6988.h.

◆ SYN6988_SOUND_111

#define SYN6988_SOUND_111   "sound111"

sound111

Definition at line 79 of file driver_syn6988.h.

◆ SYN6988_SOUND_112

#define SYN6988_SOUND_112   "sound112"

sound112

Definition at line 80 of file driver_syn6988.h.

◆ SYN6988_SOUND_113

#define SYN6988_SOUND_113   "sound113"

sound113

Definition at line 81 of file driver_syn6988.h.

◆ SYN6988_SOUND_114

#define SYN6988_SOUND_114   "sound114"

sound114

Definition at line 82 of file driver_syn6988.h.

◆ SYN6988_SOUND_115

#define SYN6988_SOUND_115   "sound115"

sound115

Definition at line 83 of file driver_syn6988.h.

◆ SYN6988_SOUND_116

#define SYN6988_SOUND_116   "sound116"

sound116

Definition at line 84 of file driver_syn6988.h.

◆ SYN6988_SOUND_117

#define SYN6988_SOUND_117   "sound117"

sound117

Definition at line 85 of file driver_syn6988.h.

◆ SYN6988_SOUND_118

#define SYN6988_SOUND_118   "sound118"

sound118

Definition at line 86 of file driver_syn6988.h.

◆ SYN6988_SOUND_119

#define SYN6988_SOUND_119   "sound119"

sound119

Definition at line 87 of file driver_syn6988.h.

◆ SYN6988_SOUND_120

#define SYN6988_SOUND_120   "sound120"

sound120

Definition at line 88 of file driver_syn6988.h.

◆ SYN6988_SOUND_121

#define SYN6988_SOUND_121   "sound121"

sound121

Definition at line 89 of file driver_syn6988.h.

◆ SYN6988_SOUND_122

#define SYN6988_SOUND_122   "sound122"

sound122

Definition at line 90 of file driver_syn6988.h.

◆ SYN6988_SOUND_123

#define SYN6988_SOUND_123   "sound123"

sound123

Definition at line 91 of file driver_syn6988.h.

◆ SYN6988_SOUND_124

#define SYN6988_SOUND_124   "sound124"

sound124

Definition at line 92 of file driver_syn6988.h.

◆ SYN6988_SOUND_201

#define SYN6988_SOUND_201   "sound201"

sound201

Definition at line 93 of file driver_syn6988.h.

◆ SYN6988_SOUND_202

#define SYN6988_SOUND_202   "sound202"

sound202

Definition at line 94 of file driver_syn6988.h.

◆ SYN6988_SOUND_203

#define SYN6988_SOUND_203   "sound203"

sound203

Definition at line 95 of file driver_syn6988.h.

◆ SYN6988_SOUND_204

#define SYN6988_SOUND_204   "sound204"

sound204

Definition at line 96 of file driver_syn6988.h.

◆ SYN6988_SOUND_205

#define SYN6988_SOUND_205   "sound205"

sound205

Definition at line 97 of file driver_syn6988.h.

◆ SYN6988_SOUND_206

#define SYN6988_SOUND_206   "sound206"

sound206

Definition at line 98 of file driver_syn6988.h.

◆ SYN6988_SOUND_207

#define SYN6988_SOUND_207   "sound207"

sound207

Definition at line 99 of file driver_syn6988.h.

◆ SYN6988_SOUND_208

#define SYN6988_SOUND_208   "sound208"

sound208

Definition at line 100 of file driver_syn6988.h.

◆ SYN6988_SOUND_209

#define SYN6988_SOUND_209   "sound209"

sound209

Definition at line 101 of file driver_syn6988.h.

◆ SYN6988_SOUND_301

#define SYN6988_SOUND_301   "sound301"

sound301

Definition at line 102 of file driver_syn6988.h.

◆ SYN6988_SOUND_302

#define SYN6988_SOUND_302   "sound302"

sound302

Definition at line 103 of file driver_syn6988.h.

◆ SYN6988_SOUND_303

#define SYN6988_SOUND_303   "sound303"

sound303

Definition at line 104 of file driver_syn6988.h.

◆ SYN6988_SOUND_304

#define SYN6988_SOUND_304   "sound304"

sound304

Definition at line 105 of file driver_syn6988.h.

◆ SYN6988_SOUND_305

#define SYN6988_SOUND_305   "sound305"

sound305

Definition at line 106 of file driver_syn6988.h.

◆ SYN6988_SOUND_306

#define SYN6988_SOUND_306   "sound306"

sound306

Definition at line 107 of file driver_syn6988.h.

◆ SYN6988_SOUND_307

#define SYN6988_SOUND_307   "sound307"

sound307

Definition at line 108 of file driver_syn6988.h.

◆ SYN6988_SOUND_308

#define SYN6988_SOUND_308   "sound308"

sound308

Definition at line 109 of file driver_syn6988.h.

◆ SYN6988_SOUND_309

#define SYN6988_SOUND_309   "sound309"

sound309

Definition at line 110 of file driver_syn6988.h.

◆ SYN6988_SOUND_310

#define SYN6988_SOUND_310   "sound310"

sound310

Definition at line 111 of file driver_syn6988.h.

◆ SYN6988_SOUND_311

#define SYN6988_SOUND_311   "sound311"

sound311

Definition at line 112 of file driver_syn6988.h.

◆ SYN6988_SOUND_312

#define SYN6988_SOUND_312   "sound312"

sound312

Definition at line 113 of file driver_syn6988.h.

◆ SYN6988_SOUND_313

#define SYN6988_SOUND_313   "sound313"

sound313

Definition at line 114 of file driver_syn6988.h.

◆ SYN6988_SOUND_314

#define SYN6988_SOUND_314   "sound314"

sound314

Definition at line 115 of file driver_syn6988.h.

◆ SYN6988_SOUND_315

#define SYN6988_SOUND_315   "sound315"

sound315

Definition at line 116 of file driver_syn6988.h.

◆ SYN6988_SOUND_316

#define SYN6988_SOUND_316   "sound316"

sound316

Definition at line 117 of file driver_syn6988.h.

◆ SYN6988_SOUND_317

#define SYN6988_SOUND_317   "sound317"

sound317

Definition at line 118 of file driver_syn6988.h.

◆ SYN6988_SOUND_318

#define SYN6988_SOUND_318   "sound318"

sound318

Definition at line 119 of file driver_syn6988.h.

◆ SYN6988_SOUND_401

#define SYN6988_SOUND_401   "sound401"

sound401

Definition at line 120 of file driver_syn6988.h.

◆ SYN6988_SOUND_402

#define SYN6988_SOUND_402   "sound402"

sound402

Definition at line 121 of file driver_syn6988.h.

◆ SYN6988_SOUND_403

#define SYN6988_SOUND_403   "sound403"

sound403

Definition at line 122 of file driver_syn6988.h.

◆ SYN6988_SOUND_404

#define SYN6988_SOUND_404   "sound404"

sound404

Definition at line 123 of file driver_syn6988.h.

◆ SYN6988_SOUND_405

#define SYN6988_SOUND_405   "sound405"

sound405

Definition at line 124 of file driver_syn6988.h.

◆ SYN6988_SOUND_406

#define SYN6988_SOUND_406   "sound406"

sound406

Definition at line 125 of file driver_syn6988.h.

◆ SYN6988_SOUND_407

#define SYN6988_SOUND_407   "sound407"

sound407

Definition at line 126 of file driver_syn6988.h.

◆ SYN6988_SOUND_408

#define SYN6988_SOUND_408   "sound408"

sound408

Definition at line 127 of file driver_syn6988.h.

Typedef Documentation

◆ syn6988_handle_t

syn6988 handle structure definition

◆ syn6988_info_t

syn6988 information structure definition

Enumeration Type Documentation

◆ syn6988_interface_t

syn6988 interface enumeration definition

Enumerator
SYN6988_INTERFACE_UART 

uart interface function

SYN6988_INTERFACE_SPI 

spi interface function

Definition at line 132 of file driver_syn6988.h.

◆ syn6988_language_t

syn6988 language enumeration definition

Enumerator
SYN6988_LANGUAGE_AUTO 

auto

SYN6988_LANGUAGE_CHINESE 

chinese

SYN6988_LANGUAGE_ENGLISH 

english

Definition at line 162 of file driver_syn6988.h.

◆ syn6988_status_t

syn6988 status enumeration definition

Enumerator
SYN6988_STATUS_OK 

ok status

SYN6988_STATUS_BUSY 

busy status

Definition at line 153 of file driver_syn6988.h.

◆ syn6988_type_t

syn6988 type enumeration definition

Enumerator
SYN6988_TYPE_GB2312 

gb2312 type

SYN6988_TYPE_GBK 

gbk type

SYN6988_TYPE_BIG5 

big5 type

SYN6988_TYPE_UNICODE_LITTLE 

unicode little endian type

SYN6988_TYPE_UNICODE_BIG 

unicode big endian type

Definition at line 141 of file driver_syn6988.h.

Function Documentation

◆ syn6988_deinit()

uint8_t syn6988_deinit ( syn6988_handle_t handle)

close the chip

Parameters
[in]*handlepointer to a syn6988 handle structure
Returns
status code
  • 0 success
  • 1 uart or spi deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 gpio ready deinit failed
Note
none

Definition at line 352 of file driver_syn6988.c.

◆ syn6988_get_interface()

uint8_t syn6988_get_interface ( syn6988_handle_t handle,
syn6988_interface_t interface 
)

get the chip interface

Parameters
[in]*handlepointer to a syn6988 handle structure
[out]*interfacepointer to a chip interface buffer
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 198 of file driver_syn6988.c.

◆ syn6988_get_status()

uint8_t syn6988_get_status ( syn6988_handle_t handle,
syn6988_status_t status 
)

get the current status

Parameters
[in]*handlepointer to a syn6988 handle structure
[out]*statuspointer to a status buffer
Returns
status code
  • 0 success
  • 1 get status failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 403 of file driver_syn6988.c.

◆ syn6988_get_text_type()

uint8_t syn6988_get_text_type ( syn6988_handle_t handle,
syn6988_type_t type 
)

get the chip text type

Parameters
[in]*handlepointer to a syn6988 handle structure
[out]*typepointer to a chip text type
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 867 of file driver_syn6988.c.

◆ syn6988_info()

uint8_t syn6988_info ( syn6988_info_t info)

get chip's information

Parameters
[out]*infopointer to a syn6988 info structure
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 1254 of file driver_syn6988.c.

◆ syn6988_init()

uint8_t syn6988_init ( syn6988_handle_t handle)

initialize the chip

Parameters
[in]*handlepointer to a syn6988 handle structure
Returns
status code
  • 0 success
  • 1 uart or spi initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
  • 4 gpio ready init failed
Note
none

Definition at line 221 of file driver_syn6988.c.

◆ syn6988_pause()

uint8_t syn6988_pause ( syn6988_handle_t handle)

pause the chip

Parameters
[in]*handlepointer to a syn6988 handle structure
Returns
status code
  • 0 success
  • 1 pause failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 spi interface can't use this function
Note
none

Definition at line 573 of file driver_syn6988.c.

◆ syn6988_resume()

uint8_t syn6988_resume ( syn6988_handle_t handle)

resume the chip

Parameters
[in]*handlepointer to a syn6988 handle structure
Returns
status code
  • 0 success
  • 1 resume failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 spi interface can't use this function
Note
none

Definition at line 639 of file driver_syn6988.c.

◆ syn6988_set_interface()

uint8_t syn6988_set_interface ( syn6988_handle_t handle,
syn6988_interface_t  interface 
)

set the chip interface

Parameters
[in]*handlepointer to a syn6988 handle structure
[in]interfacechip interface
Returns
status code
  • 0 success
  • 2 handle is NULL
Note
none

Definition at line 177 of file driver_syn6988.c.

◆ syn6988_set_synthesis_language()

uint8_t syn6988_set_synthesis_language ( syn6988_handle_t handle,
syn6988_language_t  language 
)

set synthesis language

Parameters
[in]*handlepointer to a syn6988 handle structure
[in]languageset synthesis language
Returns
status code
  • 0 success
  • 1 set synthesis language failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1060 of file driver_syn6988.c.

◆ syn6988_set_synthesis_speed()

uint8_t syn6988_set_synthesis_speed ( syn6988_handle_t handle,
uint8_t  speed 
)

set the synthesis speed

Parameters
[in]*handlepointer to a syn6988 handle structure
[in]speedsynthesis speed
Returns
status code
  • 0 success
  • 1 set synthesis speed failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 speed is invalid
Note
0 <= speed <= 10

Definition at line 1020 of file driver_syn6988.c.

◆ syn6988_set_synthesis_volume()

uint8_t syn6988_set_synthesis_volume ( syn6988_handle_t handle,
uint8_t  volume 
)

set the chip synthesis volume

Parameters
[in]*handlepointer to a syn6988 handle structure
[in]volumesynthesis volume
Returns
status code
  • 0 success
  • 1 set synthesis volume failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 volume is invalid
Note
0 <= volume <= 10

Definition at line 979 of file driver_syn6988.c.

◆ syn6988_set_text_type()

uint8_t syn6988_set_text_type ( syn6988_handle_t handle,
syn6988_type_t  type 
)

set the chip text type

Parameters
[in]*handlepointer to a syn6988 handle structure
[in]typechip text type
Returns
status code
  • 0 success
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 841 of file driver_syn6988.c.

◆ syn6988_standby()

uint8_t syn6988_standby ( syn6988_handle_t handle)

set the chip to standby mode

Parameters
[in]*handlepointer to a syn6988 handle structure
Returns
status code
  • 0 success
  • 1 standby failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 spi interface can't use this function
Note
none

Definition at line 704 of file driver_syn6988.c.

◆ syn6988_stop()

uint8_t syn6988_stop ( syn6988_handle_t handle)

stop the chip

Parameters
[in]*handlepointer to a syn6988 handle structure
Returns
status code
  • 0 success
  • 1 stop failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 spi interface can't use this function
Note
none

Definition at line 508 of file driver_syn6988.c.

◆ syn6988_synthesis_text()

uint8_t syn6988_synthesis_text ( syn6988_handle_t handle,
const char *const  fmt,
  ... 
)

synthesis the test

Parameters
[in]*handlepointer to a syn6988 handle structure
[in]fmtformat data
Returns
status code
  • 0 success
  • 1 synthesis text failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 chip is busy
  • 5 uart read failed
Note
none

Definition at line 896 of file driver_syn6988.c.

◆ syn6988_wake_up()

uint8_t syn6988_wake_up ( syn6988_handle_t handle)

wake up the chip

Parameters
[in]*handlepointer to a syn6988 handle structure
Returns
status code
  • 0 success
  • 1 wake up failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 spi interface can't use this function
Note
none

Definition at line 769 of file driver_syn6988.c.