Formatting & New updated IR

This commit is contained in:
VerstreuteSeele
2023-01-14 08:44:32 +01:00
parent 7385a28ddd
commit 905bb23fdf
216 changed files with 6455 additions and 5877 deletions

View File

@@ -33,7 +33,6 @@
* See: https://github.com/nayuki/QR-Code-generator/tree/master/cpp
*/
#ifndef __QRCODE_H_
#define __QRCODE_H_
@@ -46,55 +45,56 @@
#include <stdbool.h>
#include <stdint.h>
// QR Code Format Encoding
#define MODE_NUMERIC 0
#define MODE_ALPHANUMERIC 1
#define MODE_BYTE 2
#define MODE_NUMERIC 0
#define MODE_ALPHANUMERIC 1
#define MODE_BYTE 2
// Error Correction Code Levels
#define ECC_LOW 0
#define ECC_MEDIUM 1
#define ECC_QUARTILE 2
#define ECC_HIGH 3
#define ECC_LOW 0
#define ECC_MEDIUM 1
#define ECC_QUARTILE 2
#define ECC_HIGH 3
// If set to non-zero, this library can ONLY produce QR codes at that version
// This saves a lot of dynamic memory, as the codeword tables are skipped
#ifndef LOCK_VERSION
#define LOCK_VERSION 0
#define LOCK_VERSION 0
#endif
typedef struct QRCode {
uint8_t version;
uint8_t size;
uint8_t ecc;
uint8_t mode;
uint8_t mask;
uint8_t *modules;
uint8_t* modules;
} QRCode;
#ifdef __cplusplus
extern "C"{
#endif /* __cplusplus */
extern "C" {
#endif /* __cplusplus */
uint16_t qrcode_getBufferSize(uint8_t version);
int8_t qrcode_initText(QRCode *qrcode, uint8_t *modules, uint8_t version, uint8_t ecc, const char *data);
int8_t qrcode_initBytes(QRCode *qrcode, uint8_t *modules, uint8_t version, uint8_t ecc, uint8_t *data, uint16_t length);
bool qrcode_getModule(QRCode *qrcode, uint8_t x, uint8_t y);
int8_t qrcode_initText(
QRCode* qrcode,
uint8_t* modules,
uint8_t version,
uint8_t ecc,
const char* data);
int8_t qrcode_initBytes(
QRCode* qrcode,
uint8_t* modules,
uint8_t version,
uint8_t ecc,
uint8_t* data,
uint16_t length);
bool qrcode_getModule(QRCode* qrcode, uint8_t x, uint8_t y);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __cplusplus */
#endif /* __QRCODE_H_ */
#endif /* __QRCODE_H_ */