Files
arduino-libs/arduino-cli/libraries/RL_SYN6288/RL_SYN6288.h
2024-07-20 22:09:06 +08:00

39 lines
945 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef _SYN6288_H_
#define _SYN6288_H_
#include <Arduino.h>
#include <SoftwareSerial.h>
void OneUTF82Unicode(const char* utf_char, char* unicode_char);//单个字节 UTF8-Unicode
char* utf82unicode(const char* utf,size_t *unicode_number);//字符串 UTF8-Unicode
int length_of_unicode(const char* utf);
class SYN6288_Serial : public SoftwareSerial
{
public:
SYN6288_Serial(short rxPin, short txPin) : SoftwareSerial(rxPin,txPin) { };
void Output(u8 music_type,u8 code_format,u8* data,u8 len);
void Output(u8* data,u8 len);
/*文本控制标记说明部分列表
*[v?] 0~16其中0为静音前景音量 默认[v10]
*[m?] 0~16其中0为静音背景音量 默认[m4]
*[t?] 0~5 词语语速 默认[t4]
*[o?] 0设置为自然朗读方式 1设置为Word-By-Word方式
*其他更多指令参照官方数据手册
*/
void Stop();
void Pause();
void Recover();
void EnterSleep();
void ExitSleep();
private:
};
#endif