LibDriver WT588E02B
Loading...
Searching...
No Matches
wt588e02b basic driver function

wt588e02b basic driver modules More...

Collaboration diagram for wt588e02b basic driver function:

Data Structures

struct  wt588e02b_handle_s
 wt588e02b handle structure definition More...
struct  wt588e02b_info_s
 wt588e02b information structure definition More...

Typedefs

typedef struct wt588e02b_handle_s wt588e02b_handle_t
 wt588e02b handle structure definition
typedef struct wt588e02b_info_s wt588e02b_info_t
 wt588e02b information structure definition

Enumerations

enum  wt588e02b_bool_t { WT588E02B_BOOL_FALSE = 0x00 , WT588E02B_BOOL_TRUE = 0x01 }
 wt588e02b bool enumeration definition More...

Functions

uint8_t wt588e02b_info (wt588e02b_info_t *info)
 get chip's information
uint8_t wt588e02b_init (wt588e02b_handle_t *handle)
 initialize the chip
uint8_t wt588e02b_deinit (wt588e02b_handle_t *handle)
 deinit the chip
uint8_t wt588e02b_check_busy (wt588e02b_handle_t *handle, wt588e02b_bool_t *enable)
 check chip busy
uint8_t wt588e02b_play (wt588e02b_handle_t *handle, uint8_t ind)
 play audio
uint8_t wt588e02b_stop (wt588e02b_handle_t *handle)
 stop audio
uint8_t wt588e02b_set_vol (wt588e02b_handle_t *handle, uint8_t vol)
 set the volume
uint8_t wt588e02b_play_loop (wt588e02b_handle_t *handle, uint8_t ind)
 play loop
uint8_t wt588e02b_play_loop_advance (wt588e02b_handle_t *handle, uint8_t ind)
 play loop advance
uint8_t wt588e02b_play_loop_all (wt588e02b_handle_t *handle)
 play loop all
uint8_t wt588e02b_play_list (wt588e02b_handle_t *handle, uint8_t *list, uint8_t len)
 play list
uint8_t wt588e02b_update (wt588e02b_handle_t *handle, uint8_t ind, char *path)
 update audio
uint8_t wt588e02b_update_all (wt588e02b_handle_t *handle, char *path)
 update all audio

Detailed Description

wt588e02b basic driver modules

Typedef Documentation

◆ wt588e02b_handle_t

wt588e02b handle structure definition

◆ wt588e02b_info_t

wt588e02b information structure definition

Enumeration Type Documentation

◆ wt588e02b_bool_t

wt588e02b bool enumeration definition

Enumerator
WT588E02B_BOOL_FALSE 

disable

WT588E02B_BOOL_TRUE 

enable

Definition at line 62 of file driver_wt588e02b.h.

Function Documentation

◆ wt588e02b_check_busy()

uint8_t wt588e02b_check_busy ( wt588e02b_handle_t * handle,
wt588e02b_bool_t * enable )

check chip busy

Parameters
[in]*handlepointer to a wt588e02b handle structure
[out]*enablepointer to a bool buffer
Returns
status code
  • 0 success
  • 1 check busy failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1339 of file driver_wt588e02b.c.

◆ wt588e02b_deinit()

uint8_t wt588e02b_deinit ( wt588e02b_handle_t * handle)

deinit the chip

Parameters
[in]*handlepointer to a wt588e02b handle structure
Returns
status code
  • 0 success
  • 1 deinit failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 1541 of file driver_wt588e02b.c.

◆ wt588e02b_info()

uint8_t wt588e02b_info ( wt588e02b_info_t * info)

get chip's information

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

Definition at line 1721 of file driver_wt588e02b.c.

◆ wt588e02b_init()

uint8_t wt588e02b_init ( wt588e02b_handle_t * handle)

initialize the chip

Parameters
[in]*handlepointer to a wt588e02b handle structure
Returns
status code
  • 0 success
  • 1 gpio initialization failed
  • 2 handle is NULL
  • 3 linked functions is NULL
Note
none

Definition at line 1382 of file driver_wt588e02b.c.

◆ wt588e02b_play()

uint8_t wt588e02b_play ( wt588e02b_handle_t * handle,
uint8_t ind )

play audio

Parameters
[in]*handlepointer to a wt588e02b handle structure
[in]indindex
Returns
status code
  • 0 success
  • 1 play failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 ind > 0xDF
  • 5 chip is busy
Note
ind > 0xDF

Definition at line 486 of file driver_wt588e02b.c.

◆ wt588e02b_play_list()

uint8_t wt588e02b_play_list ( wt588e02b_handle_t * handle,
uint8_t * list,
uint8_t len )

play list

Parameters
[in]*handlepointer to a wt588e02b handle structure
[in]*listpointer to a list buffer
[in]lenlength of list
Returns
status code
  • 0 success
  • 1 play list failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 len > 40
  • 5 list is invalid
  • 6 chip is busy
Note
len > 40 list > 0xDF

Definition at line 709 of file driver_wt588e02b.c.

◆ wt588e02b_play_loop()

uint8_t wt588e02b_play_loop ( wt588e02b_handle_t * handle,
uint8_t ind )

play loop

Parameters
[in]*handlepointer to a wt588e02b handle structure
[in]indindex
Returns
status code
  • 0 success
  • 1 play loop failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 ind > 0xDF
  • 5 chip is busy
Note
ind > 0xDF

Definition at line 808 of file driver_wt588e02b.c.

◆ wt588e02b_play_loop_advance()

uint8_t wt588e02b_play_loop_advance ( wt588e02b_handle_t * handle,
uint8_t ind )

play loop advance

Parameters
[in]*handlepointer to a wt588e02b handle structure
[in]indindex
Returns
status code
  • 0 success
  • 1 play loop advance failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 ind > 0xDF
  • 5 chip is busy
Note
ind > 0xDF

Definition at line 902 of file driver_wt588e02b.c.

◆ wt588e02b_play_loop_all()

uint8_t wt588e02b_play_loop_all ( wt588e02b_handle_t * handle)

play loop all

Parameters
[in]*handlepointer to a wt588e02b handle structure
Returns
status code
  • 0 success
  • 1 play loop all failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 chip is busy
Note
none

Definition at line 994 of file driver_wt588e02b.c.

◆ wt588e02b_set_vol()

uint8_t wt588e02b_set_vol ( wt588e02b_handle_t * handle,
uint8_t vol )

set the volume

Parameters
[in]*handlepointer to a wt588e02b handle structure
[in]volvolume
Returns
status code
  • 0 success
  • 1 set vol failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 vol > 0x3F
Note
vol > 0x3F

Definition at line 571 of file driver_wt588e02b.c.

◆ wt588e02b_stop()

uint8_t wt588e02b_stop ( wt588e02b_handle_t * handle)

stop audio

Parameters
[in]*handlepointer to a wt588e02b handle structure
Returns
status code
  • 0 success
  • 1 stop failed
  • 2 handle is NULL
  • 3 handle is not initialized
Note
none

Definition at line 640 of file driver_wt588e02b.c.

◆ wt588e02b_update()

uint8_t wt588e02b_update ( wt588e02b_handle_t * handle,
uint8_t ind,
char * path )

update audio

Parameters
[in]*handlepointer to a wt588e02b handle structure
[in]indindex
[in]*pathpointer to a path buffer
Returns
status code
  • 0 success
  • 1 update failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 bin read init failed
  • 5 ind > 0xDF
Note
ind > 0xDF

Definition at line 1076 of file driver_wt588e02b.c.

◆ wt588e02b_update_all()

uint8_t wt588e02b_update_all ( wt588e02b_handle_t * handle,
char * path )

update all audio

Parameters
[in]*handlepointer to a wt588e02b handle structure
[in]*pathpointer to a path buffer
Returns
status code
  • 0 success
  • 1 update failed
  • 2 handle is NULL
  • 3 handle is not initialized
  • 4 bin read init failed
  • 5 bin size is invalid
Note
none

Definition at line 1228 of file driver_wt588e02b.c.