Initial Code Submit

This commit is contained in:
Mueller Wayan
2025-09-14 17:33:30 +02:00
commit 0396c6129d
4 changed files with 116 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
"version": "0.2.0",
"configurations": [
]
}
+12
View File
@@ -0,0 +1,12 @@
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
View File
+96
View File
@@ -0,0 +1,96 @@
#ifndef QrReader_h
#define QrReader_h
#define QRHead 0x7E00
#define QRRead 0x07
#define QRWrite 0x08
enum lightmode{
NO = 0x00,
Standard = 0x01,
KeepLight = 0x10
}uint8_t;
enum QRMode{
Manual = 0x00,
Command = 0x01,
Continuous = 0x10,
SensingMode = 0x11
}uint8_t;
enum QRAllBarcodes{
DisableAll = 0x00,
EnableAll = 0x01,
EnableDefault = 0x11
}uint8_t;
enum QRBaud{
Rate1200 = 0x09C4,
Rate4800 = 0x0271,
Rate9600 = 0x0139,
Rate14400 = 0x00D0,
Rate19200 = 0x009C,
Rate38400 = 0x004E,
Rate57600 = 0x0034,
Rate115200 = 0x001A
}uint16_t;
enum QRCode{
EAN13 = 0x002E,
EAN8 = 0x002F,
UPCA = 0x0030,
UPCE0 = 0x0031,
UPCE1 = 0x0032,
Code128 = 0x0033,
Code39 = 0x0036,
Code93 = 0x0039,
CodeBar = 0x003C,
QRCode = 0x003F,
Interleaved2of5 = 0x0040,
Industerial25 = 0x0043,
Matrix2of5 = 0x0046,
Code11 = 0x0049,
MSI = 0x004C,
RSS_14 = 0x004F,
LimitedRSS = 0x0050,
DM = 0x0054,
PDF417 = 0x0055
}uint16_t;
struct datastruct{
uint16_t Head;
uint8_t type;
uint8_t Lenght;
uint16_t Address;
uint8_t data[256];
uint16_t CRC;
};
union dataUnion{
datastruct data;
uint8_t dataarray[264];
}ComData;
class qrScanner{
public:
void SetBasicSetting(bool LEDIndication, bool silence, lightmode tragetLighting, lightmode LightingMode, QRMode ScannerMode);
void enableScanning(bool enable);
void SetImageStabilisation(uint8_t Time);
void setScanningIntervalTime(uint8_t Interval);
void setAutoSleepSettings(bool Enable, uint16_t IdleTime);
void setWarningToneSettings(uint8_t Frequency,uint8_t Duration);
void setSensitvity(uint8_t Sensitivity1, uint8_t Sensitivity2);
void setExposure(uint16_t Exposure);
void setDelyfSameCode(bool enable, uint8_t Delay);
void setTimefDataoutput(uint8_t Time);
void SetBaudRate(QRBaud rate);
void setScanSettings(bool ScanCenter, bool enableAllBarcodes);
void EnableCodeType(bool enable, QRCode code, uint8_t minLength, uint8_t maxLength);
private:
}
#endif