Add documentation

This commit is contained in:
schmelczerandras 2020-06-07 16:00:15 +02:00
commit c6063e28a4
47 changed files with 1011 additions and 148750 deletions

BIN
docs/BOM.csv Normal file

Binary file not shown.
1 ID Name Designator Footprint Quantity
2 1 M02 JP3 1X02 1
3 2 10k R1,R2,R3,R4 0603' 4
4 3 74HC595 U3 DIP-16_L19.8-W6.5-P2.54-LS7.6-BL 1
5 4 TSOP4838 U4 SENSOR-TH_TSOP4X 1
6 5 2N7000 Q1 TO-92-3_L4.9-W3.7-P1.27-L 1
7 6 ATTINY85V-10SU U1 SOIC-8_L5.3-W5.3-P1.27-LS8.0-BL 1
8 7 100u C1,C2 0603' 2
9 8 D096-12864-SPI7 U5 1X07 1
10 9 XC6206P332MR-G U2 SEEED-SOT-23 1
11 10 M06 JP4 1X06 1
12 11 M05 JP2 1X05 1

Binary file not shown.

BIN
docs/architecture.pdf Normal file

Binary file not shown.

BIN
docs/documentation.pdf Normal file

Binary file not shown.

BIN
docs/dokumentáció.docx Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 988 KiB

File diff suppressed because it is too large Load diff

3423
docs/schematic.pdf Normal file

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -9,12 +9,12 @@
static uint8_t const configuration[] PROGMEM = {
0xD5, 0xF0, // set clock frequency
0x8D, 0x14, // enable charge pump
0x20, 0x00, // horizontal addressing mode
0xD6, 0x01, // 2 times vertical zoom
0x22, 0x00, 0x03, // only draw to the top half of the screen
0xAF // display on
0xD5, 0xF0, /// set clock frequency
0x8D, 0x14, /// enable charge pump
0x20, 0x00, /// horizontal addressing mode
0xD6, 0x01, /// 2 times vertical zoom
0x22, 0x00, 0x03, /// only draw to the top half of the screen
0xAF /// display on
};
static struct {
@ -43,8 +43,8 @@ void initializeDisplay(DrawFunction drawEverything) {
setOutputPin(DISPLAY_RESET_OUTPUT_PIN, false);
for (volatile uint8_t i = 0; i != 255; i++)
;
// some time has to elapse before the next line gets called,
// otherwise the display wont turn on
/// some time has to elapse before the next line gets called,
/// otherwise the display wont turn on
setOutputPin(DISPLAY_RESET_OUTPUT_PIN, true);
for (uint8_t i = 0; i < sizeof(configuration); i++) {

View file

@ -7,51 +7,51 @@
#include "../../util/rectangle/rectangle.h"
/*
/**
SPI driver for D096-12864
*/
#define DISPLAY_RESET_OUTPUT_PIN PB0
#define DISPLAY_DC_OUTPUT_PIN PB4
// A two-times downscaling is used for greater performance
/// A two-times downscaling is used for greater performance
#define DISPLAY_WIDTH_IN_PIXELS 64
#define DISPLAY_HEIGHT_IN_PIXELS 32
// To easily access the window size
/// To easily access the window size
#define WINDOW ((Rectangle){(Vec2){0, 0}, (Vec2){DISPLAY_WIDTH_IN_PIXELS, DISPLAY_HEIGHT_IN_PIXELS}})
// To conserve RAM, drawing is done in chunks of DEFAULT_COMPOSITING_WINDOW size
// instead of buffering the whole display and writing it out at once
/// To conserve RAM, drawing is done in chunks of DEFAULT_COMPOSITING_WINDOW size
/// instead of buffering the whole display and writing it out at once
#define DEFAULT_COMPOSITING_WINDOW ((Rectangle){(Vec2){0, 0}, (Vec2){DISPLAY_WIDTH_IN_PIXELS, 8}})
typedef void (*DrawFunction)(Rectangle);
// Call DrawFunction n times after a call to drawFrame has been made
/// Call DrawFunction n times after a call to drawFrame has been made
void initializeDisplay(DrawFunction drawEverything);
// Set a the brightness of the display
// Value can be any number between 0 and 255.
/// Set a the brightness of the display
/// Value can be any number between 0 and 255.
void setDisplayContrast(uint8_t value);
// To conserve program memory, pixel based intersection test
// is implemented here.
// Calling draw functions after calling startIntersectionTest
// will set a wasIntersection bit appropriately.
/// To conserve program memory, pixel based intersection test
/// is implemented here.
/// Calling draw functions after calling startIntersectionTest
/// will set a wasIntersection bit appropriately.
// Clear buffer and wasIntersection bit
/// Clear buffer and wasIntersection bit
void startIntersectionTest();
// Return wasIntersection bit
/// Return wasIntersection bit
bool endIntersectionTest();
// Initiate a draw sequence
/// Initiate a draw sequence
void drawFrame();
// Draw a sprite of size boundingBox.size at boundingBox.position from bitmap
// if isMirrored then mirror around the vertical axis
// Bitmap's data is interpreted the following way:
/*
/// Draw a sprite of size boundingBox.size at boundingBox.position from bitmap
/// if isMirrored then mirror around the vertical axis
/// Bitmap's data is interpreted the following way:
/**
Each 16 bit word corresponds to an 8 pixel high column.
(These columns are laid out horizontally from left to right. Unfortunately,
the display uses this addressing mode.) The higher 8 bits of the word is the
@ -63,9 +63,9 @@ void drawFrame();
*/
void drawBitmapFromProgMem(Rectangle boundingBox, uint16_t const bitmap[boundingBox.size.x][(boundingBox.size.y + 7) / 8], bool isMirrored);
// Draw a one byte repeated texture covering the parameter box
// for a white rectangle use these arguments: invertedMask: don't care, fill: 0xFF
// for a black rectangle use these arguments: invertedMask: 0xFF, fill: 0x00
/// Draw a one byte repeated texture covering the parameter box
/// for a white rectangle use these arguments: invertedMask: don't care, fill: 0xFF
/// for a black rectangle use these arguments: invertedMask: 0xFF, fill: 0x00
void drawFilledRectangle(Rectangle box, uint8_t invertedMask, uint8_t fill);
#endif

View file

@ -8,11 +8,11 @@
#include "../uart/receive.h"
// (0.5625 + (0.5625 + 1.6875) / 2) / 1000 / timer interval
/// (0.5625 + (0.5625 + 1.6875) / 2) / 1000 / timer interval
#define MEAN_OF_0_1_BIT_TIMES 53
// 9 / 2 / 1000 / timer interval
/// 9 / 2 / 1000 / timer interval
#define MAYBE_ONE_CHECK_TIME 141
// some large value
/// some large value
#define TIMEOUT 254
typedef enum {
@ -139,8 +139,8 @@ ISR(TIM0_COMPB_vect) {
}
void initializeInfra(OnCommandReceived onCommandReceived) {
setBit(PORTB, IR_PIN); // enable pull-up
setBit(PCMSK, IR_PIN); // specific pin change interrupt enable
setBit(GIMSK, PCIE); // global on pin change interrupt enable;
setBit(PORTB, IR_PIN); /// enable pull-up
setBit(PCMSK, IR_PIN); /// specific pin change interrupt enable
setBit(GIMSK, PCIE); /// global on pin change interrupt enable;
infra.onCommandReceived = onCommandReceived;
}

View file

@ -5,7 +5,7 @@
#include <avr/io.h>
/*
/**
Custom NEC implementation using a TSOP4838
*/
@ -15,9 +15,9 @@
typedef void (*OnCommandReceived)(uint8_t);
// Initialize infra and call onCommandReceived with every received byte
// Call onCommandReceived with the argument REPEAT_CODE if a repeat code
// has been received.
/// Initialize infra and call onCommandReceived with every received byte
/// Call onCommandReceived with the argument REPEAT_CODE if a repeat code
/// has been received.
void initializeInfra(OnCommandReceived onCommandReceived);
#endif

View file

@ -4,10 +4,10 @@
#include <stdbool.h>
#include <avr/io.h>
// FrameFunction gets previousFrameTime (in milliseconds) as argument
/// FrameFunction gets previousFrameTime (in milliseconds) as argument
typedef bool (*FrameFunction)(uint8_t);
// Call function every frameLengthInMilliseconds while it returns true
/// Call function every frameLengthInMilliseconds while it returns true
void startFrameLoop(FrameFunction function, uint8_t frameLengthInMilliseconds);
#endif

Some files were not shown because too many files have changed in this diff Show more