SWE-350 TOTP Generator Milestone 5
The DE-10 board has six 7-segment displays, this can be used to display and generate a time based one-time pin (TOTP).
Loading...
Searching...
No Matches
qrcode.h File Reference
#include <stdint.h>
Include dependency graph for qrcode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  QRCode
 

Macros

#define false   0
 
#define true   1
 
#define MODE_NUMERIC   0
 
#define MODE_ALPHANUMERIC   1
 
#define MODE_BYTE   2
 
#define ECC_LOW   0
 
#define ECC_MEDIUM   1
 
#define ECC_QUARTILE   2
 
#define ECC_HIGH   3
 
#define LOCK_VERSION   0
 

Typedefs

typedef struct QRCode QRCode
 

Functions

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)
 

Macro Definition Documentation

◆ ECC_HIGH

#define ECC_HIGH   3

Definition at line 58 of file qrcode.h.

◆ ECC_LOW

#define ECC_LOW   0

Definition at line 55 of file qrcode.h.

◆ ECC_MEDIUM

#define ECC_MEDIUM   1

Definition at line 56 of file qrcode.h.

◆ ECC_QUARTILE

#define ECC_QUARTILE   2

Definition at line 57 of file qrcode.h.

◆ false

#define false   0

The MIT License (MIT)

This library is written and maintained by Richard Moore. Major parts were derived from Project Nayuki's library.

Copyright (c) 2017 Richard Moore (https://github.com/ricmoo/QRCode) Copyright (c) 2017 Project Nayuki (https://www.nayuki.io/page/qr-code-generator-library)

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. Special thanks to Nayuki (https://www.nayuki.io/) from which this library was heavily inspired and compared against.

See: https://github.com/nayuki/QR-Code-generator/tree/master/cpp

Definition at line 42 of file qrcode.h.

◆ LOCK_VERSION

#define LOCK_VERSION   0

Definition at line 64 of file qrcode.h.

◆ MODE_ALPHANUMERIC

#define MODE_ALPHANUMERIC   1

Definition at line 50 of file qrcode.h.

◆ MODE_BYTE

#define MODE_BYTE   2

Definition at line 51 of file qrcode.h.

◆ MODE_NUMERIC

#define MODE_NUMERIC   0

Definition at line 49 of file qrcode.h.

◆ true

#define true   1

Definition at line 43 of file qrcode.h.

Typedef Documentation

◆ QRCode

typedef struct QRCode QRCode

Function Documentation

◆ qrcode_getBufferSize()

uint16_t qrcode_getBufferSize ( uint8_t version)

Definition at line 775 of file qrcode.c.

◆ qrcode_getModule()

bool qrcode_getModule ( QRCode * qrcode,
uint8_t x,
uint8_t y )

Definition at line 860 of file qrcode.c.

◆ qrcode_initBytes()

int8_t qrcode_initBytes ( QRCode * qrcode,
uint8_t * modules,
uint8_t version,
uint8_t ecc,
uint8_t * data,
uint16_t length )

Definition at line 780 of file qrcode.c.

◆ qrcode_initText()

int8_t qrcode_initText ( QRCode * qrcode,
uint8_t * modules,
uint8_t version,
uint8_t ecc,
const char * data )

Definition at line 856 of file qrcode.c.