LibDriver WT588E02B
Loading...
Searching...
No Matches
driver_wt588e02b.c File Reference

driver wt588e02b source file More...

#include "driver_wt588e02b.h"
Include dependency graph for driver_wt588e02b.c:

Go to the source code of this file.

Macros

#define CHIP_NAME   "Waytronic Electronic WT588E02B"
 chip information definition
#define MANUFACTURER_NAME   "Waytronic Electronic"
#define SUPPLY_VOLTAGE_MIN   2.0f
#define SUPPLY_VOLTAGE_MAX   5.5f
#define MAX_CURRENT   16.0f
#define TEMPERATURE_MIN   -20.0f
#define TEMPERATURE_MAX   85.0f
#define DRIVER_VERSION   1000
#define WT588E02B_COMMAND_PLAY   0xF0
 chip command definition
#define WT588E02B_COMMAND_VOL   0xF1
#define WT588E02B_COMMAND_PLAY_LOOP   0xF2
#define WT588E02B_COMMAND_PLAY_LIST   0xF3
#define WT588E02B_COMMAND_STOP   0xFF
#define WT588E02B_COMMAND_UPDATE_ADDR   0xE0
#define WT588E02B_COMMAND_UPDATE_ALL   0xE1
#define WT588E02B_COMMAND_UPDATE_STATUS   0xDF
#define WT588E02B_COMMAND_UPDATE_END   0xEF

Functions

uint8_t wt588e02b_play (wt588e02b_handle_t *handle, uint8_t ind)
 play audio
uint8_t wt588e02b_set_vol (wt588e02b_handle_t *handle, uint8_t vol)
 set the volume
uint8_t wt588e02b_stop (wt588e02b_handle_t *handle)
 stop audio
uint8_t wt588e02b_play_list (wt588e02b_handle_t *handle, uint8_t *list, uint8_t len)
 play list
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_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
uint8_t wt588e02b_check_busy (wt588e02b_handle_t *handle, wt588e02b_bool_t *enable)
 check chip busy
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_set_reg (wt588e02b_handle_t *handle, uint8_t *buf, uint16_t len, uint32_t us)
 set the chip register
uint8_t wt588e02b_get_reg (wt588e02b_handle_t *handle, uint8_t *buf, uint16_t len, uint32_t us)
 get the chip register
uint8_t wt588e02b_info (wt588e02b_info_t *info)
 get chip's information

Detailed Description

driver wt588e02b source 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
2025-01-30

history

Date Version Author Description
2025/01/30 1.0 Shifeng Li first upload

Definition in file driver_wt588e02b.c.

Macro Definition Documentation

◆ CHIP_NAME

#define CHIP_NAME   "Waytronic Electronic WT588E02B"

chip information definition

chip name

Definition at line 42 of file driver_wt588e02b.c.

◆ DRIVER_VERSION

#define DRIVER_VERSION   1000

driver version

Definition at line 49 of file driver_wt588e02b.c.

◆ MANUFACTURER_NAME

#define MANUFACTURER_NAME   "Waytronic Electronic"

manufacturer name

Definition at line 43 of file driver_wt588e02b.c.

◆ MAX_CURRENT

#define MAX_CURRENT   16.0f

chip max current

Definition at line 46 of file driver_wt588e02b.c.

◆ SUPPLY_VOLTAGE_MAX

#define SUPPLY_VOLTAGE_MAX   5.5f

chip max supply voltage

Definition at line 45 of file driver_wt588e02b.c.

◆ SUPPLY_VOLTAGE_MIN

#define SUPPLY_VOLTAGE_MIN   2.0f

chip min supply voltage

Definition at line 44 of file driver_wt588e02b.c.

◆ TEMPERATURE_MAX

#define TEMPERATURE_MAX   85.0f

chip max operating temperature

Definition at line 48 of file driver_wt588e02b.c.

◆ TEMPERATURE_MIN

#define TEMPERATURE_MIN   -20.0f

chip min operating temperature

Definition at line 47 of file driver_wt588e02b.c.

◆ WT588E02B_COMMAND_PLAY

#define WT588E02B_COMMAND_PLAY   0xF0

chip command definition

play command

Definition at line 54 of file driver_wt588e02b.c.

◆ WT588E02B_COMMAND_PLAY_LIST

#define WT588E02B_COMMAND_PLAY_LIST   0xF3

play list command

Definition at line 57 of file driver_wt588e02b.c.

◆ WT588E02B_COMMAND_PLAY_LOOP

#define WT588E02B_COMMAND_PLAY_LOOP   0xF2

play loop command

Definition at line 56 of file driver_wt588e02b.c.

◆ WT588E02B_COMMAND_STOP

#define WT588E02B_COMMAND_STOP   0xFF

stop command

Definition at line 58 of file driver_wt588e02b.c.

◆ WT588E02B_COMMAND_UPDATE_ADDR

#define WT588E02B_COMMAND_UPDATE_ADDR   0xE0

update address command

Definition at line 59 of file driver_wt588e02b.c.

◆ WT588E02B_COMMAND_UPDATE_ALL

#define WT588E02B_COMMAND_UPDATE_ALL   0xE1

update all command

Definition at line 60 of file driver_wt588e02b.c.

◆ WT588E02B_COMMAND_UPDATE_END

#define WT588E02B_COMMAND_UPDATE_END   0xEF

update end command

Definition at line 62 of file driver_wt588e02b.c.

◆ WT588E02B_COMMAND_UPDATE_STATUS

#define WT588E02B_COMMAND_UPDATE_STATUS   0xDF

update status command

Definition at line 61 of file driver_wt588e02b.c.

◆ WT588E02B_COMMAND_VOL

#define WT588E02B_COMMAND_VOL   0xF1

vol command

Definition at line 55 of file driver_wt588e02b.c.