C++ refactoring, plus low-power support, plus software-based SPI CS
I'm backlogged.
This commit is contained in:
16
.gdbinit
16
.gdbinit
@@ -1,3 +1,17 @@
|
||||
set $PWR = (PWR_TypeDef *)(0x40000000 + 0x00007000U)
|
||||
tar rem :4242
|
||||
file watch.elf
|
||||
load watch.elf
|
||||
|
||||
set $PERIPH_BASE = (uint32_t)0x40000000U
|
||||
set $APBPERIPH_BASE = $PERIPH_BASE
|
||||
set $AHBPERIPH_BASE = ($PERIPH_BASE + 0x00020000U)
|
||||
set $IOPPERIPH_BASE = ($PERIPH_BASE + 0x10000000U)
|
||||
|
||||
set $RCC = (RCC_TypeDef *)(0x40000000 + 0x00020000U + 0x1000U)
|
||||
set $RTC = (RTC_TypeDef *)(0x40000000 + 0x00002800U)
|
||||
set $PWR = (PWR_TypeDef *)(0x40000000 + 0x00007000U)
|
||||
set $EXTI = (EXTI_TypeDef *) ($APBPERIPH_BASE + 0x00010400U)
|
||||
|
||||
set history filename .gdb_history
|
||||
set history save on
|
||||
set history size 1024
|
||||
|
||||
59
BlinkTask.h
Normal file
59
BlinkTask.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "macros.h"
|
||||
|
||||
#include "ReturnCode.h"
|
||||
#include "Time.h"
|
||||
#include "SystemTime.h"
|
||||
|
||||
class BlinkTask : public Common::Schedule::Task {
|
||||
public:
|
||||
|
||||
BlinkTask(Common::time_t blink_period)
|
||||
: m_period(blink_period)
|
||||
{}
|
||||
|
||||
Common::ReturnCode init() {
|
||||
/** Enable Port A,B clock */
|
||||
SET(RCC->IOPENR, RCC_IOPENR_IOPBEN);
|
||||
/** Enable pin P3 for output */
|
||||
SET_TO(GPIOB->MODER,
|
||||
GPIO_MODER_MODE3,
|
||||
GPIO_MODER_MODE3_0);
|
||||
|
||||
CLR(GPIOB->OTYPER, GPIO_OTYPER_OT_3);
|
||||
CLR(GPIOB->PUPDR, GPIO_PUPDR_PUPD3);
|
||||
|
||||
return Common::ReturnCode::OK;
|
||||
}
|
||||
|
||||
Common::Schedule::NextTime execute() override {
|
||||
FLIP(GPIOB->ODR, GPIO_ODR_OD3);
|
||||
|
||||
return Common::Schedule::NextTime::in(m_period / 2);
|
||||
}
|
||||
|
||||
private:
|
||||
Common::time_t m_period;
|
||||
};
|
||||
151
ConcreteTaskScheduler.h
Normal file
151
ConcreteTaskScheduler.h
Normal file
@@ -0,0 +1,151 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "macros.h"
|
||||
|
||||
#include "TaskScheduler.h"
|
||||
#include "SystemTime.h"
|
||||
#include "LowPower.h"
|
||||
|
||||
namespace Common {
|
||||
namespace Schedule {
|
||||
|
||||
template <uint32_t MAX_TASKS>
|
||||
class ConcreteTaskScheduler : public TaskScheduler {
|
||||
public:
|
||||
ConcreteTaskScheduler() :
|
||||
m_tasks(),
|
||||
m_task_count(0),
|
||||
m_cycle_count(0)
|
||||
{}
|
||||
|
||||
[[noreturn]] void run() override
|
||||
{
|
||||
while (1) {
|
||||
cycle();
|
||||
//remove_dead_tasks();
|
||||
}
|
||||
}
|
||||
|
||||
void add_task(Task &task, NextTime &time) override
|
||||
{
|
||||
if (m_task_count == MAX_TASKS || time.get_type() == ScheduleType::NEVER) {
|
||||
return;
|
||||
}
|
||||
|
||||
m_tasks[m_task_count++] = TaskEvent(task, time);
|
||||
}
|
||||
|
||||
// ~ConcreteTaskScheduler() {}
|
||||
|
||||
private:
|
||||
struct TaskEvent {
|
||||
|
||||
TaskEvent() :
|
||||
m_task(nullptr),
|
||||
m_time()
|
||||
{}
|
||||
|
||||
TaskEvent(Task &task, NextTime time) :
|
||||
m_task(&task),
|
||||
m_time(time)
|
||||
{}
|
||||
|
||||
Task *m_task;
|
||||
NextTime m_time;
|
||||
};
|
||||
|
||||
/* FIXME: implement some sort of fixed-size priority queue */
|
||||
TaskEvent m_tasks[MAX_TASKS];
|
||||
std::size_t m_task_count;
|
||||
uint64_t m_cycle_count;
|
||||
|
||||
void inline call_task(TaskEvent &task)
|
||||
{
|
||||
task.m_time = task.m_task->execute();
|
||||
}
|
||||
|
||||
void inline cycle()
|
||||
{
|
||||
Common::time_t time = 0;
|
||||
BSP::SystemTimer::get_time(time);
|
||||
bool task_died = false;
|
||||
|
||||
/* Keep state for when the next task will execute. */
|
||||
// bool execed = false;
|
||||
// Common::time_t next_time = ~0;
|
||||
|
||||
for (size_t i = 0; i < m_task_count; i++) {
|
||||
TaskEvent &event = m_tasks[i];
|
||||
|
||||
if (event.m_time.get_type() == ScheduleType::AT_TIME) {
|
||||
if (time >= event.m_time.get_time()) {
|
||||
// execed = true;
|
||||
call_task(event);
|
||||
} else {
|
||||
// next_time = MIN(next_time, event.m_time.get_time());
|
||||
}
|
||||
} else if (event.m_time.get_type() == ScheduleType::NEVER) {
|
||||
task_died = true;
|
||||
}
|
||||
}
|
||||
|
||||
/* If nothing happened this cycle, and nothing will happen for
|
||||
awhile, go to sleep */
|
||||
//if (!execed && (next_time - time > Time::millis(10))) {
|
||||
//BSP::LowPower::stop();
|
||||
//}
|
||||
if (task_died) {
|
||||
remove_dead_tasks();
|
||||
}
|
||||
|
||||
m_cycle_count++;
|
||||
}
|
||||
|
||||
void inline remove_dead_tasks()
|
||||
{
|
||||
std::size_t i_new = 0;
|
||||
std::size_t i_old = 0;
|
||||
while (i_old < m_task_count) {
|
||||
//FIXME: this is broken
|
||||
bool is_dead = true;
|
||||
if (m_tasks[i_old].m_time.get_type() != ScheduleType::NEVER) {
|
||||
is_dead = false;
|
||||
}
|
||||
|
||||
if (i_old != i_new) {
|
||||
m_tasks[i_new] = m_tasks[i_old];
|
||||
}
|
||||
|
||||
if (!is_dead) {
|
||||
i_new++;
|
||||
}
|
||||
i_old++;
|
||||
}
|
||||
|
||||
m_task_count = i_new;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
201
DisplayDriver.cpp
Normal file
201
DisplayDriver.cpp
Normal file
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "DisplayDriver.h"
|
||||
#include "macros.h"
|
||||
#include "font.h"
|
||||
|
||||
namespace BSP {
|
||||
|
||||
using Common::Schedule::NextTime;
|
||||
using Common::ReturnCode;
|
||||
|
||||
DisplayDriver::DisplayDriver(Common::Schedule::TaskScheduler &scheduler, SpiDriver &spi)
|
||||
: m_scheduler(scheduler)
|
||||
, m_spi(spi)
|
||||
, m_is_dirty(true)
|
||||
, m_dirty_line_min(0)
|
||||
, m_dirty_line_max(0)
|
||||
{
|
||||
buffer_init();
|
||||
}
|
||||
|
||||
ReturnCode DisplayDriver::init()
|
||||
{
|
||||
/** Enable Port A,B clock */
|
||||
SET(RCC->IOPENR, RCC_IOPENR_IOPBEN);
|
||||
/** Enable pin P3 for output */
|
||||
SET_TO(GPIOB->MODER,
|
||||
GPIO_MODER_MODE3,
|
||||
GPIO_MODER_MODE3_0);
|
||||
|
||||
CLR(GPIOB->OTYPER, GPIO_OTYPER_OT_3);
|
||||
CLR(GPIOB->PUPDR, GPIO_PUPDR_PUPD3);
|
||||
|
||||
return Common::ReturnCode::OK;
|
||||
|
||||
|
||||
return ReturnCode::OK;
|
||||
}
|
||||
|
||||
NextTime DisplayDriver::execute()
|
||||
{
|
||||
return NextTime::never();
|
||||
}
|
||||
|
||||
void DisplayDriver::buffer_init()
|
||||
{
|
||||
for (size_t i = 0; i < ARRAY_SIZE(m_buffer.lines); i++) {
|
||||
struct display_line *line = &m_buffer.lines[i];
|
||||
line->mode = 1; // Update display
|
||||
line->line = i;
|
||||
for (size_t j = 0; j < ARRAY_SIZE(line->data); j++) {
|
||||
line->data[j] = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
m_buffer.dummy = 0;
|
||||
}
|
||||
|
||||
void DisplayDriver::set_dirty(unsigned int y)
|
||||
{
|
||||
if (!m_is_dirty) {
|
||||
m_is_dirty = true;
|
||||
m_dirty_line_min = y;
|
||||
m_dirty_line_max = y;
|
||||
} else {
|
||||
m_dirty_line_min = MIN(y, m_dirty_line_min);
|
||||
m_dirty_line_max = MAX(y, m_dirty_line_max);
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayDriver::set_bit(unsigned int x, unsigned int y, uint8_t val)
|
||||
{
|
||||
if (x >= DISPLAY_WIDTH || y >= DISPLAY_HEIGHT) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct display_line *line = &m_buffer.lines[y];
|
||||
uint8_t *byte = &line->data[x >> 3];
|
||||
if (val) {
|
||||
CLR_POS(*byte, x & 7);
|
||||
} else {
|
||||
SET_POS(*byte, x & 7);
|
||||
}
|
||||
|
||||
set_dirty(y);
|
||||
}
|
||||
|
||||
void DisplayDriver::set_byte(unsigned int x, unsigned int y, uint8_t val)
|
||||
{
|
||||
if (x >= DISPLAY_WIDTH || y >= DISPLAY_HEIGHT) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (x & 7) {
|
||||
return;
|
||||
}
|
||||
|
||||
struct display_line *line = &m_buffer.lines[y];
|
||||
line->data[x >> 3] = val;
|
||||
set_dirty(y);
|
||||
}
|
||||
|
||||
void DisplayDriver::char_at(int *x_off, int y_off, char c, const struct font *font)
|
||||
{
|
||||
const struct glyph *g = glyph_for_char(font, c);
|
||||
if (g == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: Don't hardcode this
|
||||
int byte_cols = (g->cols / 8);
|
||||
if (g->cols & 7) {
|
||||
byte_cols++;
|
||||
}
|
||||
if (byte_cols & 1) {
|
||||
byte_cols++;
|
||||
}
|
||||
for (size_t x = 0; x < g->cols; x++) {
|
||||
for (size_t y = 0; y < g->rows; y++) {
|
||||
int byte_x = x >> 3;
|
||||
int byte_y = y;
|
||||
uint8_t bit = (g->bitmap[byte_y * byte_cols + byte_x] >> (7 - (x & 7))) & 1;
|
||||
/* 16 is font max height */
|
||||
set_bit(g->left + *x_off + x, y_off + y + 16 - g->top, bit);
|
||||
}
|
||||
}
|
||||
*x_off += g->advance;
|
||||
}
|
||||
|
||||
void DisplayDriver::string_at(int x_off, int y_off, const char *string, const struct font *font)
|
||||
{
|
||||
int i = 0;
|
||||
while (string[i]) {
|
||||
char_at(&x_off, y_off, string[i], font);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayDriver::refresh()
|
||||
{
|
||||
if (!m_is_dirty) {
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t *start = (uint8_t *) &m_buffer.lines[m_dirty_line_min];
|
||||
// Data size
|
||||
size_t size = sizeof(m_buffer.lines[0]) * (m_dirty_line_max - m_dirty_line_min + 1);
|
||||
// Trailer dummy data
|
||||
size += 2;
|
||||
|
||||
m_spi.tx_blocking(start, size);
|
||||
m_is_dirty = false;
|
||||
}
|
||||
|
||||
void DisplayDriver::clear()
|
||||
{
|
||||
buffer_init();
|
||||
m_is_dirty = true;
|
||||
m_dirty_line_min = 0;
|
||||
m_dirty_line_max = DISPLAY_HEIGHT - 1;
|
||||
}
|
||||
|
||||
//TODO: put me somewhere fonty
|
||||
const struct glyph *DisplayDriver::glyph_for_char(const struct font *font, char c)
|
||||
{
|
||||
// TODO: This is almost the least efficient way imaginable to implement this
|
||||
for (int i = 0; i < font->max; i++) {
|
||||
const struct glyph *g = font->glyphs[i];
|
||||
if (g == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (g->glyph == c) {
|
||||
return g;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
84
DisplayDriver.h
Normal file
84
DisplayDriver.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Task.h"
|
||||
#include "SpiDriver.h"
|
||||
#include "font.h"
|
||||
|
||||
namespace BSP {
|
||||
|
||||
class DisplayDriver : public Common::Schedule::Task {
|
||||
public:
|
||||
DisplayDriver(Common::Schedule::TaskScheduler &scheduler, SpiDriver &spi);
|
||||
|
||||
static constexpr uint8_t DISPLAY_WIDTH = 144;
|
||||
static constexpr uint8_t DISPLAY_HEIGHT = 168;
|
||||
|
||||
|
||||
/**
|
||||
* Common::Schedule::Task
|
||||
*/
|
||||
Common::ReturnCode init();
|
||||
Common::Schedule::NextTime execute() override;
|
||||
|
||||
/**
|
||||
* DisplayDriver
|
||||
*/
|
||||
void set_bit(unsigned int x, unsigned int y, uint8_t val);
|
||||
void set_byte(unsigned int x, unsigned int y, uint8_t val);
|
||||
void char_at(int *x_off, int y_off, char c, const struct font *font);
|
||||
void string_at(int x_off, int y_off, const char *string, const struct font *font);
|
||||
void refresh();
|
||||
void clear();
|
||||
|
||||
private:
|
||||
void buffer_init();
|
||||
void set_dirty(unsigned int y);
|
||||
const struct glyph *glyph_for_char(const struct font *font, char c);
|
||||
|
||||
struct display_line
|
||||
{
|
||||
uint8_t mode;
|
||||
uint8_t line;
|
||||
uint8_t data[DISPLAY_WIDTH / 8];
|
||||
};
|
||||
|
||||
struct display_buffer
|
||||
{
|
||||
struct display_line lines[DISPLAY_HEIGHT];
|
||||
uint16_t dummy;
|
||||
};
|
||||
|
||||
|
||||
Common::Schedule::TaskScheduler &m_scheduler;
|
||||
SpiDriver &m_spi;
|
||||
|
||||
struct display_buffer m_buffer;
|
||||
|
||||
bool m_is_dirty;
|
||||
uint8_t m_dirty_line_min;
|
||||
uint8_t m_dirty_line_max;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
57
DisplayTimeTask.cpp
Normal file
57
DisplayTimeTask.cpp
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "DisplayTimeTask.h"
|
||||
#include "LowPower.h"
|
||||
|
||||
#include "font-notomono-10.h"
|
||||
|
||||
|
||||
using Common::ReturnCode;
|
||||
using Common::Time;
|
||||
using Common::Schedule::NextTime;
|
||||
|
||||
DisplayTimeTask::DisplayTimeTask(BSP::DisplayDriver &driver)
|
||||
: m_driver(driver)
|
||||
, m_y_pos(0)
|
||||
{}
|
||||
|
||||
ReturnCode DisplayTimeTask::init() {
|
||||
return ReturnCode::OK;
|
||||
}
|
||||
|
||||
NextTime DisplayTimeTask::execute() {
|
||||
//static const char msg_str[] = "Hello world!";
|
||||
|
||||
int x = 20;
|
||||
|
||||
m_driver.clear();
|
||||
m_driver.string_at(x, m_y_pos++, "Hello world!", &font_notomono_10);
|
||||
m_driver.refresh();
|
||||
|
||||
if (m_y_pos > 160) {
|
||||
m_y_pos = 0;
|
||||
}
|
||||
|
||||
BSP::LowPower::stop();
|
||||
|
||||
return NextTime::asap();
|
||||
}
|
||||
41
DisplayTimeTask.h
Normal file
41
DisplayTimeTask.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "macros.h"
|
||||
|
||||
#include "DisplayDriver.h"
|
||||
#include "ReturnCode.h"
|
||||
#include "Task.h"
|
||||
|
||||
class DisplayTimeTask : public Common::Schedule::Task {
|
||||
public:
|
||||
|
||||
DisplayTimeTask(BSP::DisplayDriver &display);
|
||||
|
||||
Common::ReturnCode init();
|
||||
Common::Schedule::NextTime execute();
|
||||
|
||||
private:
|
||||
BSP::DisplayDriver &m_driver;
|
||||
unsigned int m_y_pos;
|
||||
};
|
||||
70
LowPower.cpp
Normal file
70
LowPower.cpp
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "SystemTime.h"
|
||||
#include "LowPower.h"
|
||||
#include "macros.h"
|
||||
|
||||
#include "stm32l0xx.h"
|
||||
|
||||
namespace BSP {
|
||||
|
||||
using Common::ReturnCode;
|
||||
|
||||
ReturnCode LowPower::init()
|
||||
{
|
||||
/* Enable Clocks */
|
||||
SET(RCC->APB1ENR, RCC_APB1ENR_PWREN);
|
||||
|
||||
// FIXME: Make these configurable, will mess with power consumption
|
||||
SET(DBGMCU->CR, DBGMCU_CR_DBG_STOP);
|
||||
SET(DBGMCU->CR, DBGMCU_CR_DBG_SLEEP);
|
||||
SET(DBGMCU->CR, DBGMCU_CR_DBG_STANDBY);
|
||||
return ReturnCode::OK;
|
||||
}
|
||||
|
||||
ReturnCode LowPower::sleep()
|
||||
{
|
||||
return ReturnCode::FAIL;
|
||||
}
|
||||
|
||||
ReturnCode LowPower::stop()
|
||||
{
|
||||
|
||||
/* Prepare to enter stop mode */
|
||||
SET(PWR->CR, PWR_CR_CWUF); // clear WUF
|
||||
while(PWR->CSR & PWR_CSR_WUF) {};
|
||||
CLR(PWR->CR, PWR_CR_PDDS); // Enter stop mode when the CPU enters deepsleep
|
||||
CLR(RCC->CFGR, RCC_CFGR_STOPWUCK); // MSI oscillator is wake-up from stop clock
|
||||
SET(SCB->SCR, SCB_SCR_SLEEPDEEP_Msk); // low-power mode = stop mode
|
||||
// Common::time_t time0 = ~0;
|
||||
// SystemTimer::get_time(time0);
|
||||
__WFI(); // enter low-power mode
|
||||
// Common::time_t time1 = ~0;
|
||||
// SystemTimer::get_time(time1);
|
||||
// Common::time_t timediff = time1 - time0;
|
||||
// volatile Common::time_t timediff2 = timediff;
|
||||
|
||||
return ReturnCode::OK;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
38
LowPower.h
Normal file
38
LowPower.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ReturnCode.h"
|
||||
|
||||
namespace BSP {
|
||||
|
||||
class LowPower {
|
||||
public:
|
||||
LowPower() = delete;
|
||||
|
||||
static Common::ReturnCode init();
|
||||
|
||||
static Common::ReturnCode sleep();
|
||||
static Common::ReturnCode stop();
|
||||
};
|
||||
|
||||
}
|
||||
46
LowPowerDelay.h
Normal file
46
LowPowerDelay.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Task.h"
|
||||
#include "LowPower.h"
|
||||
|
||||
class LowPowerDelay : public Common::Schedule::Task {
|
||||
|
||||
public:
|
||||
LowPowerDelay()
|
||||
: m_is_first(true)
|
||||
{}
|
||||
Common::Schedule::NextTime execute() {
|
||||
|
||||
if (m_is_first) {
|
||||
m_is_first = false;
|
||||
} else {
|
||||
BSP::LowPower::stop();
|
||||
}
|
||||
|
||||
return Common::Schedule::NextTime::in(Common::Time::millis(200));
|
||||
}
|
||||
|
||||
private:
|
||||
bool m_is_first;
|
||||
};
|
||||
41
Main.cpp.bak
Normal file
41
Main.cpp.bak
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
|
||||
// TODO: Make a better "system" include
|
||||
#include "stm32l0xx.h"
|
||||
|
||||
#include "ConcreteTaskScheduler.h"
|
||||
#include "SpiDriver.h"
|
||||
#include "DisplayDriver.h"
|
||||
|
||||
using Common::Schedule::TaskScheduler;
|
||||
|
||||
static Common::Schedule::ConcreteTaskScheduler<10> g_scheduler;
|
||||
static BSP::SpiDriver g_spi1(g_scheduler, SPI1);
|
||||
static BSP::DisplayDriver g_display(g_scheduler, g_spi1);
|
||||
|
||||
[[noreturn]] void main()
|
||||
{
|
||||
g_spi1.init();
|
||||
g_display.init();
|
||||
g_scheduler.run();
|
||||
}
|
||||
40
Makefile
40
Makefile
@@ -24,13 +24,13 @@
|
||||
# Tools
|
||||
#
|
||||
|
||||
TOOL_PREFIX ?= arm-none-eabi-
|
||||
TOOL_PREFIX ?= arm-eabi-
|
||||
CC = $(TOOL_PREFIX)gcc
|
||||
CXX = $(TOOL_PREFIX)g++
|
||||
CPP = $(TOOL_PREFIX)cpp
|
||||
AS = $(TOOL_PREFIX)as
|
||||
LD = $(TOOL_PREFIX)gcc
|
||||
OBJCOPY = $(TOOL_PREFIX)objcopy
|
||||
STM32FLASH ?= stm32flash
|
||||
|
||||
#
|
||||
# Device Variables
|
||||
@@ -40,24 +40,30 @@ DEVICE_TYPE ?= stm32l031k6
|
||||
DEVICE_FAMILY = stm32l031xx
|
||||
DEVICE_LINE = stm32l0xx
|
||||
|
||||
|
||||
#
|
||||
# Filenames and paths
|
||||
#
|
||||
|
||||
C_SOURCES := $(shell find $(SOURCEDIR) -name '*.c')
|
||||
S_SOURCES := $(shell find $(SOURCEDIR) -name '*.s')
|
||||
# Ignores dotfiles and other garbage some tools leave behind
|
||||
define find_important
|
||||
$(shell find $(1) -type f -and -name $(2) -and -not -iname "*~" -and -not -iname "*#*" -and -not \( -path "*.cquery_cached_index*" \) )
|
||||
endef
|
||||
|
||||
C_SOURCES := $(call find_important, $(SOURCEDIR), '*.c')
|
||||
CXX_SOURCES := $(call find_important, $(SOURCEDIR), '*.cpp')
|
||||
S_SOURCES := $(call find_important, $(SOURCEDIR), '*.s')
|
||||
SPP_SOURCES := $(DEVICE_TYPE).S
|
||||
SOURCES = $(C_SOURCES) $(S_SOURCES) $(SPP_SOURCES)
|
||||
SOURCES = $(C_SOURCES) $(S_SOURCES) $(SPP_SOURCES) $(CPP_SOURCES)
|
||||
|
||||
C_OBJS := $(patsubst %.c,%.o,$(C_SOURCES))
|
||||
CXX_OBJS := $(patsubst %.cpp,%.o,$(CXX_SOURCES))
|
||||
S_OBJS := $(patsubst %.s,%.o,$(S_SOURCES))
|
||||
SPP_OBJS := $(patsubst %.S,%.o,$(SPP_SOURCES))
|
||||
OBJS = $(C_OBJS) $(S_OBJS) $(SPP_OBJS)
|
||||
OBJS = $(C_OBJS) $(S_OBJS) $(SPP_OBJS) $(CXX_OBJS)
|
||||
|
||||
LINKER_SCRIPT ?= $(DEVICE_TYPE).ld
|
||||
|
||||
OUTPUT_NAME ?= test
|
||||
OUTPUT_NAME ?= watch
|
||||
OUTPUT_BIN ?= $(OUTPUT_NAME).bin
|
||||
OUTPUT_ELF ?= $(OUTPUT_NAME).elf
|
||||
|
||||
@@ -70,7 +76,8 @@ DEVICE_DEFINE = $(subst XX,xx,$(shell echo $(DEVICE_FAMILY) | tr '[:lower:]' '[:
|
||||
# C pedantism
|
||||
CFLAGS = -Wall -Wextra -Wpedantic
|
||||
# Debug/optimization
|
||||
CFLAGS += -Og -ggdb
|
||||
CFLAGS += -ggdb -g3
|
||||
CFLAGS += -fdata-sections -ffunction-sections
|
||||
# Architecture
|
||||
CFLAGS += -mthumb -mcpu=cortex-m0plus
|
||||
CFLAGS += -ffreestanding
|
||||
@@ -81,11 +88,15 @@ CFLAGS += -I./lib/stm32/$(DEVICE_LINE)/Include
|
||||
CFLAGS += -I./lib/CMSIS/Core/Include
|
||||
CFLAGS += -I./lib/fonts/
|
||||
|
||||
CXX_FLAGS = -std=c++14 -fno-exceptions -fno-rtti
|
||||
|
||||
# Startup Definitions
|
||||
ASFLAGS += -D__STARTUP_CLEAR_BSS
|
||||
ASFLAGS += -D__HEAP_SIZE=0 # No heap- let the linker decide it all
|
||||
|
||||
LDFLAGS += -nostdinc -lc -lnosys -Wl,--gc-sections -Wl,--print-memory-usage
|
||||
LDFLAGS += -lc -lstdc++ -nostdinc -lnosys -Wl,--gc-sections -Wl,--build-id=None
|
||||
LDFLAGS += -Wl,--wrap=malloc -Wl,--wrap=free # Fail to compile if dynamic allocation is sneaking through
|
||||
LDFLAGS += -mthumb -mcpu=cortex-m0plus
|
||||
|
||||
#
|
||||
# Default Target
|
||||
@@ -105,13 +116,17 @@ build: $(OUTPUT_BIN)
|
||||
@echo "AS $@"
|
||||
@$(CC) $(ASFLAGS) -c $< -o $@
|
||||
|
||||
%.o: %.cpp
|
||||
@echo "CXX $@"
|
||||
@$(CXX) $(CXX_FLAGS) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(OUTPUT_BIN): $(OUTPUT_ELF)
|
||||
@echo "OBJCOPY $@"
|
||||
@$(OBJCOPY) -O binary $(OUTPUT_ELF) $(OUTPUT_BIN)
|
||||
|
||||
$(OUTPUT_ELF): $(LINKER_SCRIPT) $(OBJS)
|
||||
@echo "LD $@"
|
||||
$(LD) $(LDFLAGS) -T $(LINKER_SCRIPT) -o $(OUTPUT_ELF) $(OBJS)
|
||||
@$(LD) $(LDFLAGS) -T $(LINKER_SCRIPT) -o $(OUTPUT_ELF) $(OBJS)
|
||||
|
||||
#
|
||||
# Utilities
|
||||
@@ -122,8 +137,7 @@ STM32FLASH_DEVICE = /dev/ttyUSB0
|
||||
.PHONY: flash
|
||||
flash: $(OUTPUT_BIN)
|
||||
@echo "FLASH $(OUTPUT_BIN)"
|
||||
@st-flash write $(OUTPUT_BIN) 0x8000000 2> /dev/null
|
||||
# stm32flash -w $(OUTPUT_BIN) $(STM32FLASH_DEVICE)
|
||||
@st-flash write $(OUTPUT_BIN) 0x8000000
|
||||
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
32
ReturnCode.h
Normal file
32
ReturnCode.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Common {
|
||||
|
||||
enum class ReturnCode : int {
|
||||
OK = 0,
|
||||
BUSY = 1,
|
||||
FAIL = 2,
|
||||
};
|
||||
|
||||
}
|
||||
118
SpiDriver.cpp
Normal file
118
SpiDriver.cpp
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "SpiDriver.h"
|
||||
#include "macros.h"
|
||||
|
||||
namespace BSP {
|
||||
|
||||
using RC = Common::ReturnCode;
|
||||
using Common::Schedule::TaskScheduler;
|
||||
using Common::Schedule::NextTime;
|
||||
using Common::Time;
|
||||
|
||||
SpiDriver::SpiDriver(TaskScheduler &scheduler)
|
||||
: m_scheduler(scheduler)
|
||||
, m_spi(SPI1)
|
||||
{}
|
||||
|
||||
void SpiDriver::init()
|
||||
{
|
||||
SET(RCC->IOPENR, RCC_IOPENR_IOPAEN);
|
||||
RCC->APB2ENR |= RCC_APB2ENR_SPI1EN;
|
||||
|
||||
/* Assign SPI_MOSI to PA12 (AFRH5), since PA7 is taken by LPTIM_OUT */
|
||||
GPIOA->AFR[1] &= ~GPIO_AFRH_AFRH4;
|
||||
|
||||
SET_TO(GPIOA->MODER, GPIO_MODER_MODE12, 2u << GPIO_MODER_MODE12_Pos);
|
||||
|
||||
GPIOA->OTYPER &= ~GPIO_OTYPER_OT_12;
|
||||
GPIOA->PUPDR &= ~GPIO_PUPDR_PUPD12;
|
||||
|
||||
// SPI1 NSS (PA4)
|
||||
//GPIOA->AFR[0] &= ~GPIO_AFRL_AFRL4;
|
||||
|
||||
SET_TO(GPIOA->MODER, GPIO_MODER_MODE4, 1u << GPIO_MODER_MODE4_Pos);
|
||||
|
||||
GPIOA->OTYPER &= ~GPIO_OTYPER_OT_4;
|
||||
GPIOA->PUPDR &= ~GPIO_PUPDR_PUPD4;
|
||||
// enable pullup, since the pin doesn't seem to stay up
|
||||
GPIOA->PUPDR |= 2u << GPIO_PUPDR_PUPD4_Pos;
|
||||
|
||||
// SPI1 SCK (PA5)
|
||||
GPIOA->AFR[0] &= ~GPIO_AFRL_AFRL5;
|
||||
|
||||
SET_TO(GPIOA->MODER, GPIO_MODER_MODE5, 2u << GPIO_MODER_MODE5_Pos);
|
||||
|
||||
GPIOA->OTYPER &= ~GPIO_OTYPER_OT_5;
|
||||
GPIOA->PUPDR &= ~GPIO_PUPDR_PUPD5;
|
||||
|
||||
// SPI1 MISO (PA6)
|
||||
GPIOA->AFR[0] &= ~GPIO_AFRL_AFRL6;
|
||||
|
||||
SET_TO(GPIOA->MODER, GPIO_MODER_MODE6, 2u << GPIO_MODER_MODE6_Pos);
|
||||
|
||||
GPIOA->OTYPER &= ~GPIO_OTYPER_OT_6;
|
||||
GPIOA->PUPDR &= ~GPIO_PUPDR_PUPD6;
|
||||
|
||||
// Enable Master mode and half the baud rate, so it's set to ~1MHz
|
||||
m_spi->CR1 |= SPI_CR1_MSTR | SPI_CR1_LSBFIRST | SPI_CR1_SSM;
|
||||
m_spi->CR1 |= 1u << SPI_CR1_BR_Pos;
|
||||
m_spi->CR2 |= SPI_CR2_SSOE;
|
||||
}
|
||||
|
||||
NextTime SpiDriver::execute()
|
||||
{
|
||||
return NextTime::never();
|
||||
}
|
||||
|
||||
RC SpiDriver::tx_blocking(const uint8_t *data, size_t len)
|
||||
{
|
||||
if (len <= 0) {
|
||||
return RC::FAIL;
|
||||
}
|
||||
|
||||
m_spi->CR1 |= SPI_CR1_SPE;
|
||||
|
||||
//FLIP(GPIOB->ODR, GPIO_ODR_OD3);
|
||||
CLR(m_spi->CR1, SPI_CR1_SSI);
|
||||
SET(GPIOA->ODR, GPIO_ODR_OD4);
|
||||
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
while (!(m_spi->SR & SPI_SR_TXE)) {}
|
||||
m_spi->DR = data[i];
|
||||
}
|
||||
|
||||
//FLIP(GPIOB->ODR, GPIO_ODR_OD3);
|
||||
|
||||
while (!(m_spi->SR & SPI_SR_TXE)) {}
|
||||
|
||||
// Ensure that NSS is held for long enough to meet the display's thSCS
|
||||
for (int i = 0; i < 4; i++);
|
||||
|
||||
m_spi->CR1 &= ~SPI_CR1_SPE;
|
||||
SET(m_spi->CR1, SPI_CR1_SSI);
|
||||
CLR(GPIOA->ODR, GPIO_ODR_OD4);
|
||||
|
||||
return RC::OK;
|
||||
}
|
||||
|
||||
}
|
||||
47
SpiDriver.h
Normal file
47
SpiDriver.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ReturnCode.h"
|
||||
#include "TaskScheduler.h"
|
||||
|
||||
// TODO: Find a better include for this
|
||||
#include "stm32l0xx.h"
|
||||
|
||||
namespace BSP {
|
||||
|
||||
class SpiDriver : public Common::Schedule::Task {
|
||||
|
||||
public:
|
||||
// TODO: Add configurability / provide a real abstraction
|
||||
SpiDriver(Common::Schedule::TaskScheduler &scheduler);
|
||||
|
||||
void init();
|
||||
Common::Schedule::NextTime execute() override;
|
||||
Common::ReturnCode tx_blocking(const uint8_t *data, size_t len);
|
||||
|
||||
private:
|
||||
Common::Schedule::TaskScheduler &m_scheduler;
|
||||
SPI_TypeDef *m_spi;
|
||||
};
|
||||
|
||||
}
|
||||
171
SystemTime.cpp
Normal file
171
SystemTime.cpp
Normal file
@@ -0,0 +1,171 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "SystemTime.h"
|
||||
#include "macros.h"
|
||||
|
||||
namespace BSP {
|
||||
|
||||
using Common::ReturnCode;
|
||||
using Common::time_t;
|
||||
|
||||
uint32_t SystemTimer::m_seconds(0);
|
||||
RTC_TypeDef *SystemTimer::m_rtc = nullptr;
|
||||
|
||||
void SystemTimer::enable_rtc_write()
|
||||
{
|
||||
/*<! Disable write protection */
|
||||
RTC->WPR = 0xCA;
|
||||
RTC->WPR = 0x53;
|
||||
}
|
||||
|
||||
void SystemTimer::disable_rtc_write()
|
||||
{
|
||||
/*<! Disable write protection */
|
||||
RTC->WPR = 0x00;
|
||||
}
|
||||
|
||||
void SystemTimer::enable_rtc_wakeup_interrupt()
|
||||
{
|
||||
CLR(RTC->CR, RTC_CR_WUTE);
|
||||
while (!(RTC->ISR & RTC_ISR_WUTWF)) {}
|
||||
SET_TO(RTC->WUTR, RTC_WUTR_WUT, 0);
|
||||
SET_TO(RTC->CR, RTC_CR_WUCKSEL, RTC_CR_WUCKSEL_2);
|
||||
|
||||
SET(EXTI->IMR, EXTI_IMR_IM20);
|
||||
SET(EXTI->EMR, EXTI_EMR_EM20);
|
||||
SET(EXTI->RTSR, EXTI_RTSR_RT20);
|
||||
|
||||
NVIC_EnableIRQ(RTC_IRQn);
|
||||
NVIC_SetPriority(RTC_IRQn, 0);
|
||||
|
||||
SET(RTC->CR, RTC_CR_WUTE | RTC_CR_WUTIE);
|
||||
}
|
||||
|
||||
ReturnCode SystemTimer::init_hw()
|
||||
{
|
||||
uint32_t temp = RCC->CSR;
|
||||
|
||||
SET(RCC->CSR, RCC_CSR_RTCRST);
|
||||
SET(RCC->APB1ENR, RCC_APB1ENR_PWREN);
|
||||
SET(PWR->CR, PWR_CR_DBP);
|
||||
|
||||
/*<! Set RTC input clock to the LSI (low-speed internal 32.768kHz) clock */
|
||||
SET(temp, RCC_CSR_LSEON);
|
||||
SET_TO(temp, RCC_CSR_RTCSEL, RCC_CSR_RTCSEL_0);
|
||||
SET(temp, RCC_CSR_RTCEN);
|
||||
RCC->CSR = temp;
|
||||
|
||||
while (!(RCC->CSR & RCC_CSR_LSERDY)) {}
|
||||
|
||||
enable_rtc_write();
|
||||
|
||||
RTC->ISR = RTC_ISR_INIT;
|
||||
while (!(RTC->ISR & RTC_ISR_INITF)) {}
|
||||
|
||||
// FIXME: Make this use the minimum prescaler value
|
||||
/*<! Set the Clock Prescalers (32.768kHz / 128 / 256 = 1Hz */
|
||||
/*<! Set the Async prescaler to the Maximum (divide the clock by 128) */
|
||||
SET_TO(RTC->PRER, RTC_PRER_PREDIV_A, 0);
|
||||
/*<! Set the Syncronous scaler (divide the clock by 255 + 1) */
|
||||
SET_TO(RTC->PRER, RTC_PRER_PREDIV_S, (LSE_CLOCK_FREQ - 1));
|
||||
|
||||
/*<! Load initial date and time */
|
||||
// TODO
|
||||
/* uint32_t time = 0; */
|
||||
/* uint32_t date = 0; */
|
||||
/*<! Set the date and time format */
|
||||
// TODO: currently defaults to 24hr
|
||||
|
||||
// 12-Hour format
|
||||
SET(RTC->CR, RTC_CR_FMT);
|
||||
|
||||
uint32_t time = 0;
|
||||
SET(time, RTC_TR_PM);
|
||||
SET_TO(time, RTC_TR_HT, 1 << RTC_TR_HT_Pos);
|
||||
SET_TO(time, RTC_TR_HU, 2 << RTC_TR_HU_Pos);
|
||||
SET_TO(time, RTC_TR_MNT, 5 << RTC_TR_MNT_Pos);
|
||||
SET_TO(time, RTC_TR_MNU, 9 << RTC_TR_MNU_Pos);
|
||||
SET_TO(time, RTC_TR_ST, 0 << RTC_TR_ST_Pos);
|
||||
SET_TO(time, RTC_TR_SU, 0 << RTC_TR_SU_Pos);
|
||||
RTC->TR = time;
|
||||
|
||||
|
||||
CLR(RTC->ISR, RTC_ISR_INIT);
|
||||
|
||||
enable_rtc_wakeup_interrupt();
|
||||
|
||||
disable_rtc_write();
|
||||
|
||||
return ReturnCode::OK;
|
||||
}
|
||||
|
||||
ReturnCode SystemTimer::init(RTC_TypeDef *rtc)
|
||||
{
|
||||
if (rtc == nullptr) {
|
||||
return ReturnCode::FAIL;
|
||||
}
|
||||
|
||||
m_rtc = rtc;
|
||||
m_seconds = 0;
|
||||
|
||||
init_hw();
|
||||
|
||||
return ReturnCode::OK;
|
||||
}
|
||||
|
||||
ReturnCode SystemTimer::get_time(time_t &time)
|
||||
{
|
||||
if (m_rtc == nullptr) {
|
||||
return ReturnCode::FAIL;
|
||||
}
|
||||
|
||||
uint32_t new_secs, old_secs, ssr, subsecond;
|
||||
do {
|
||||
old_secs = m_seconds;
|
||||
ssr = m_rtc->SSR & 0xFFFF;
|
||||
new_secs = m_seconds;
|
||||
} while (new_secs != old_secs);
|
||||
|
||||
new_secs = new_secs * LSE_CLOCK_FREQ;
|
||||
/** SSR is a countdown register */
|
||||
subsecond = (new_secs + LSE_CLOCK_FREQ - 1 - ssr) * Common::Time::MILLIS_PER_SEC / LSE_CLOCK_FREQ;
|
||||
time += Common::Time::millis(subsecond);
|
||||
|
||||
return ReturnCode::OK;
|
||||
}
|
||||
|
||||
void SystemTimer::increment_seconds()
|
||||
{
|
||||
m_seconds++;
|
||||
}
|
||||
|
||||
extern "C" void RTC_IRQHandler(void);
|
||||
|
||||
void RTC_IRQHandler() {
|
||||
SystemTimer::increment_seconds();
|
||||
// Clear the interrupt in the EXTI
|
||||
SET(EXTI->PR, EXTI_PR_PIF20);
|
||||
// Clear the interrupt in the RTC
|
||||
CLR(RTC->ISR, RTC_ISR_WUTF);
|
||||
}
|
||||
|
||||
}
|
||||
53
SystemTime.h
Normal file
53
SystemTime.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ReturnCode.h"
|
||||
#include "Time.h"
|
||||
|
||||
#include "stm32l0xx.h"
|
||||
|
||||
namespace BSP {
|
||||
|
||||
class SystemTimer {
|
||||
public:
|
||||
static Common::ReturnCode init(RTC_TypeDef *rtc);
|
||||
static Common::ReturnCode get_time(Common::time_t &time);
|
||||
static void increment_seconds();
|
||||
private:
|
||||
|
||||
static Common::ReturnCode init_hw();
|
||||
static void enable_rtc_write();
|
||||
static void disable_rtc_write();
|
||||
static void enable_rtc_wakeup_interrupt();
|
||||
|
||||
static constexpr uint32_t LSE_CLOCK_FREQ = 32768;
|
||||
|
||||
/** I'll be dead before this rolls over */
|
||||
/** FIXME FIXME FIXME: XXX This should be an atomic */
|
||||
static uint32_t m_seconds;
|
||||
static RTC_TypeDef *m_rtc;
|
||||
};
|
||||
|
||||
}
|
||||
24
Task.cpp
Normal file
24
Task.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
namespace Common {
|
||||
|
||||
}
|
||||
85
Task.h
Normal file
85
Task.h
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ReturnCode.h"
|
||||
#include "Time.h"
|
||||
#include "SystemTime.h"
|
||||
|
||||
namespace Common {
|
||||
namespace Schedule {
|
||||
|
||||
enum class ScheduleType {
|
||||
AT_TIME,
|
||||
NEVER,
|
||||
};
|
||||
|
||||
class NextTime {
|
||||
public:
|
||||
NextTime() :
|
||||
m_type(ScheduleType::NEVER),
|
||||
m_time(0)
|
||||
{}
|
||||
|
||||
static inline NextTime in(time_t offset) {
|
||||
time_t time = 0;
|
||||
/* If this call fails, we likely haven't initialized the timer
|
||||
* yet, so just treat offset as the time- hopefully the system
|
||||
* timer will be initialzed soon
|
||||
*/
|
||||
BSP::SystemTimer::get_time(time);
|
||||
time += offset;
|
||||
return {ScheduleType::AT_TIME, time };
|
||||
}
|
||||
|
||||
static inline NextTime never() {
|
||||
return { ScheduleType::NEVER, 0 };
|
||||
}
|
||||
|
||||
static inline NextTime asap() {
|
||||
return { ScheduleType::AT_TIME, 0 };
|
||||
}
|
||||
|
||||
static inline NextTime at(time_t time) {
|
||||
return { ScheduleType::AT_TIME, time };
|
||||
}
|
||||
|
||||
inline ScheduleType get_type() { return m_type; }
|
||||
inline time_t get_time() { return m_time; }
|
||||
|
||||
private:
|
||||
NextTime(ScheduleType type, time_t time) :
|
||||
m_type(type),
|
||||
m_time(time)
|
||||
{}
|
||||
|
||||
ScheduleType m_type;
|
||||
time_t m_time;
|
||||
};
|
||||
|
||||
class Task {
|
||||
public:
|
||||
virtual NextTime execute() = 0;
|
||||
};
|
||||
|
||||
} // namespace Schedule
|
||||
} // namespace Common
|
||||
41
TaskScheduler.h
Normal file
41
TaskScheduler.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include "Task.h"
|
||||
#include "system.h"
|
||||
|
||||
namespace Common {
|
||||
namespace Schedule {
|
||||
|
||||
class TaskScheduler {
|
||||
public:
|
||||
virtual void add_task(Task &task, NextTime &time) = 0;
|
||||
[[noreturn]] virtual void run() = 0;
|
||||
protected:
|
||||
//virtual ~TaskScheduler() {}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
62
Time.h
Normal file
62
Time.h
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace Common {
|
||||
|
||||
using time_t = uint64_t;
|
||||
|
||||
class Time {
|
||||
public:
|
||||
static constexpr uint64_t MILLIS_PER_SEC = 1e3;
|
||||
static constexpr uint64_t MICROS_PER_SEC = 1e6;
|
||||
static constexpr uint64_t NANOS_PER_SEC = 1e9;
|
||||
|
||||
static constexpr uint64_t MICROS_PER_MILLI = 1e3;
|
||||
static constexpr uint64_t NANOS_PER_MILLI = 1e6;
|
||||
|
||||
static constexpr uint64_t NANOS_PER_MICRO = 1e3;
|
||||
|
||||
static inline time_t nanos(uint64_t value)
|
||||
{
|
||||
return value / NANOS_PER_MICRO;
|
||||
}
|
||||
|
||||
static inline time_t micros(uint64_t value)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
static inline time_t millis(uint64_t value)
|
||||
{
|
||||
return value * MICROS_PER_MILLI;
|
||||
}
|
||||
|
||||
static inline time_t seconds(uint64_t value)
|
||||
{
|
||||
return value * MICROS_PER_SEC;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
71
app_manager.h
Normal file
71
app_manager.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
namespace BSP {
|
||||
|
||||
namespace Application {
|
||||
|
||||
};
|
||||
|
||||
class ApplicationManager {
|
||||
public:
|
||||
Common::ReturnCode set_next_display(&DisplayBW);
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
class TimedTaskManager {
|
||||
|
||||
public:
|
||||
|
||||
|
||||
};
|
||||
|
||||
class Task {
|
||||
|
||||
public:
|
||||
execute();
|
||||
|
||||
};
|
||||
|
||||
|
||||
class DisplayBW {
|
||||
|
||||
public:
|
||||
uint32_t get_width() const virtual = 0;
|
||||
uint32_t get_height() const virtual = 0;
|
||||
void set_bit(bool set, uint32 x, uint32_t y) virtual = 0;
|
||||
uint8_t *get_row(uint32_t y) const virtual = 0;
|
||||
void clear(uint32_t y) const virtual = 0;
|
||||
int start_refresh(uint32_t y) const virtual = 0;
|
||||
|
||||
};
|
||||
|
||||
class DisplayBWScreen {
|
||||
|
||||
void display() virtual = 0;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
@@ -148,7 +148,13 @@ void display_char_at(struct display *display, int *x_off, int y_off, char c, con
|
||||
}
|
||||
|
||||
// TODO: Don't hardcode this
|
||||
int byte_cols = 1;
|
||||
int byte_cols = (g->cols / 8);
|
||||
if (g->cols & 7) {
|
||||
byte_cols++;
|
||||
}
|
||||
if (byte_cols & 1) {
|
||||
byte_cols++;
|
||||
}
|
||||
for (size_t x = 0; x < g->cols; x++) {
|
||||
for (size_t y = 0; y < g->rows; y++) {
|
||||
int byte_x = x >> 3;
|
||||
|
||||
751
lib/fonts/font-OpenSansExtraBold-28.c
Normal file
751
lib/fonts/font-OpenSansExtraBold-28.c
Normal file
@@ -0,0 +1,751 @@
|
||||
/* AUTOMATICALLY GENERATED FILE! EDITING NOT RECOMMENDED!
|
||||
*
|
||||
* This file is distributed under the terms of the MIT License.
|
||||
* See the LICENSE file at the top of this tree, or if it is missing a copy can
|
||||
* be found at http://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "fontem.h"
|
||||
#include "font-OpenSansExtraBold-28.h"
|
||||
|
||||
/* Character list: 0123456789:APM */
|
||||
|
||||
/** Kerning table for character ' '. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0020[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character ' '. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0020 = {
|
||||
.glyph = 32,
|
||||
.left = 0,
|
||||
.top = 0,
|
||||
.advance = 10,
|
||||
.cols = 0,
|
||||
.rows = 0,
|
||||
.bitmap = NULL,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0020,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '0'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_0030[] = {
|
||||
0x01, 0xfc, 0x00, 0x00,
|
||||
0x07, 0xff, 0x00, 0x00,
|
||||
0x0f, 0xff, 0x80, 0x00,
|
||||
0x1f, 0xff, 0xc0, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0x00,
|
||||
0x7f, 0x8f, 0xf0, 0x00,
|
||||
0x7f, 0x8f, 0xf0, 0x00,
|
||||
0x7f, 0x07, 0xf0, 0x00,
|
||||
0x7f, 0x07, 0xf0, 0x00,
|
||||
0x7f, 0x07, 0xf0, 0x00,
|
||||
0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xf8, 0x00,
|
||||
0x7f, 0x07, 0xf0, 0x00,
|
||||
0x7f, 0x07, 0xf0, 0x00,
|
||||
0x7f, 0x07, 0xf0, 0x00,
|
||||
0x7f, 0x8f, 0xf0, 0x00,
|
||||
0x7f, 0x8f, 0xf0, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0x00,
|
||||
0x1f, 0xff, 0xc0, 0x00,
|
||||
0x0f, 0xff, 0x80, 0x00,
|
||||
0x07, 0xff, 0x00, 0x00,
|
||||
0x01, 0xfc, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '0'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0030[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '0'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0030 = {
|
||||
.glyph = 48,
|
||||
.left = 1,
|
||||
.top = 28,
|
||||
.advance = 23,
|
||||
.cols = 21,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_0030,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0030,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '1'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_0031[] = {
|
||||
0x00, 0x7f,
|
||||
0x01, 0xff,
|
||||
0x03, 0xff,
|
||||
0x07, 0xff,
|
||||
0x0f, 0xff,
|
||||
0x1f, 0xff,
|
||||
0x7f, 0xff,
|
||||
0xff, 0xff,
|
||||
0xff, 0xff,
|
||||
0x7e, 0xff,
|
||||
0x3c, 0xff,
|
||||
0x18, 0xff,
|
||||
0x10, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
0x00, 0xff,
|
||||
};
|
||||
|
||||
/** Kerning table for character '1'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0031[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '1'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0031 = {
|
||||
.glyph = 49,
|
||||
.left = 2,
|
||||
.top = 28,
|
||||
.advance = 23,
|
||||
.cols = 16,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_0031,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0031,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '2'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_0032[] = {
|
||||
0x03, 0xfc, 0x00, 0x00,
|
||||
0x0f, 0xff, 0x80, 0x00,
|
||||
0x3f, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xe0, 0x00,
|
||||
0x7f, 0xff, 0xf0, 0x00,
|
||||
0x3f, 0x0f, 0xf0, 0x00,
|
||||
0x1c, 0x0f, 0xf0, 0x00,
|
||||
0x08, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x1f, 0xe0, 0x00,
|
||||
0x00, 0x3f, 0xe0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x7f, 0x80, 0x00,
|
||||
0x00, 0xff, 0x80, 0x00,
|
||||
0x01, 0xff, 0x00, 0x00,
|
||||
0x03, 0xfe, 0x00, 0x00,
|
||||
0x07, 0xf8, 0x00, 0x00,
|
||||
0x0f, 0xf0, 0x00, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x00,
|
||||
0x7f, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '2'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0032[] = {
|
||||
{ /* .left = '7' */ 55, /* .offset = */ -1 },
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '2'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0032 = {
|
||||
.glyph = 50,
|
||||
.left = 1,
|
||||
.top = 28,
|
||||
.advance = 23,
|
||||
.cols = 21,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_0032,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0032,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '3'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_0033[] = {
|
||||
0x03, 0xfc, 0x00, 0x00,
|
||||
0x1f, 0xff, 0x80, 0x00,
|
||||
0x7f, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xff, 0xe0, 0x00,
|
||||
0x7f, 0xff, 0xe0, 0x00,
|
||||
0x3f, 0xff, 0xf0, 0x00,
|
||||
0x1c, 0x1f, 0xf0, 0x00,
|
||||
0x10, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x0f, 0xe0, 0x00,
|
||||
0x00, 0x0f, 0xe0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x07, 0xff, 0x80, 0x00,
|
||||
0x07, 0xff, 0x00, 0x00,
|
||||
0x07, 0xfc, 0x00, 0x00,
|
||||
0x07, 0xff, 0x80, 0x00,
|
||||
0x07, 0xff, 0xc0, 0x00,
|
||||
0x07, 0xff, 0xe0, 0x00,
|
||||
0x00, 0x1f, 0xf0, 0x00,
|
||||
0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x0f, 0xf0, 0x00,
|
||||
0x80, 0x0f, 0xf0, 0x00,
|
||||
0xf0, 0x1f, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xc0, 0x00,
|
||||
0xff, 0xff, 0x00, 0x00,
|
||||
0x0f, 0xf8, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '3'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0033[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '3'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0033 = {
|
||||
.glyph = 51,
|
||||
.left = 1,
|
||||
.top = 28,
|
||||
.advance = 23,
|
||||
.cols = 20,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_0033,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0033,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '4'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_0034[] = {
|
||||
0x00, 0x1f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x7f, 0xc0, 0x00,
|
||||
0x00, 0xff, 0xc0, 0x00,
|
||||
0x00, 0xff, 0xc0, 0x00,
|
||||
0x01, 0xff, 0xc0, 0x00,
|
||||
0x03, 0xff, 0xc0, 0x00,
|
||||
0x03, 0xff, 0xc0, 0x00,
|
||||
0x07, 0xff, 0xc0, 0x00,
|
||||
0x0f, 0xdf, 0xc0, 0x00,
|
||||
0x1f, 0xdf, 0xc0, 0x00,
|
||||
0x1f, 0x9f, 0xc0, 0x00,
|
||||
0x3f, 0x9f, 0xc0, 0x00,
|
||||
0x7f, 0x1f, 0xc0, 0x00,
|
||||
0x7e, 0x1f, 0xc0, 0x00,
|
||||
0xfe, 0x1f, 0xc0, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0x00, 0x1f, 0xc0, 0x00,
|
||||
0x00, 0x1f, 0xc0, 0x00,
|
||||
0x00, 0x1f, 0xc0, 0x00,
|
||||
0x00, 0x1f, 0xc0, 0x00,
|
||||
0x00, 0x1f, 0xc0, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '4'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0034[] = {
|
||||
{ /* .left = '7' */ 55, /* .offset = */ -1 },
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '4'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0034 = {
|
||||
.glyph = 52,
|
||||
.left = 1,
|
||||
.top = 28,
|
||||
.advance = 23,
|
||||
.cols = 21,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_0034,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0034,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '5'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_0035[] = {
|
||||
0x7f, 0xff, 0x80, 0x00,
|
||||
0x7f, 0xff, 0x80, 0x00,
|
||||
0x7f, 0xff, 0x80, 0x00,
|
||||
0x7f, 0xff, 0x80, 0x00,
|
||||
0x7f, 0xff, 0x80, 0x00,
|
||||
0x7f, 0xff, 0x80, 0x00,
|
||||
0x7f, 0x00, 0x00, 0x00,
|
||||
0x7f, 0x00, 0x00, 0x00,
|
||||
0x7f, 0x00, 0x00, 0x00,
|
||||
0x7e, 0x00, 0x00, 0x00,
|
||||
0x7f, 0xfc, 0x00, 0x00,
|
||||
0x7f, 0xff, 0x00, 0x00,
|
||||
0xff, 0xff, 0x80, 0x00,
|
||||
0xff, 0xff, 0xc0, 0x00,
|
||||
0xff, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xff, 0xe0, 0x00,
|
||||
0x10, 0x3f, 0xe0, 0x00,
|
||||
0x00, 0x1f, 0xe0, 0x00,
|
||||
0x00, 0x0f, 0xe0, 0x00,
|
||||
0x00, 0x0f, 0xe0, 0x00,
|
||||
0x00, 0x1f, 0xe0, 0x00,
|
||||
0xf0, 0x3f, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xc0, 0x00,
|
||||
0xff, 0xff, 0x80, 0x00,
|
||||
0xff, 0xff, 0x00, 0x00,
|
||||
0xff, 0xfe, 0x00, 0x00,
|
||||
0x1f, 0xf0, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '5'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0035[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '5'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0035 = {
|
||||
.glyph = 53,
|
||||
.left = 2,
|
||||
.top = 28,
|
||||
.advance = 23,
|
||||
.cols = 19,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_0035,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0035,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '6'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_0036[] = {
|
||||
0x00, 0x3f, 0xe0, 0x00,
|
||||
0x01, 0xff, 0xe0, 0x00,
|
||||
0x03, 0xff, 0xe0, 0x00,
|
||||
0x0f, 0xff, 0xe0, 0x00,
|
||||
0x1f, 0xff, 0xe0, 0x00,
|
||||
0x1f, 0xff, 0xe0, 0x00,
|
||||
0x3f, 0xe0, 0x00, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x00,
|
||||
0x7f, 0x00, 0x00, 0x00,
|
||||
0x7f, 0x3f, 0x00, 0x00,
|
||||
0x7e, 0x7f, 0xc0, 0x00,
|
||||
0x7e, 0xff, 0xe0, 0x00,
|
||||
0x7f, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0x8f, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xf8, 0x00,
|
||||
0x7f, 0x07, 0xf8, 0x00,
|
||||
0x7f, 0x07, 0xf8, 0x00,
|
||||
0x7f, 0x8f, 0xf0, 0x00,
|
||||
0x3f, 0xff, 0xf0, 0x00,
|
||||
0x3f, 0xff, 0xf0, 0x00,
|
||||
0x1f, 0xff, 0xe0, 0x00,
|
||||
0x0f, 0xff, 0xc0, 0x00,
|
||||
0x07, 0xff, 0x80, 0x00,
|
||||
0x01, 0xfc, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '6'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0036[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '6'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0036 = {
|
||||
.glyph = 54,
|
||||
.left = 1,
|
||||
.top = 28,
|
||||
.advance = 23,
|
||||
.cols = 21,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_0036,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0036,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '7'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_0037[] = {
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xe0, 0x00,
|
||||
0x00, 0x1f, 0xe0, 0x00,
|
||||
0x00, 0x1f, 0xc0, 0x00,
|
||||
0x00, 0x1f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0x80, 0x00,
|
||||
0x00, 0x7f, 0x80, 0x00,
|
||||
0x00, 0x7f, 0x00, 0x00,
|
||||
0x00, 0xff, 0x00, 0x00,
|
||||
0x00, 0xfe, 0x00, 0x00,
|
||||
0x01, 0xfe, 0x00, 0x00,
|
||||
0x01, 0xfe, 0x00, 0x00,
|
||||
0x01, 0xfc, 0x00, 0x00,
|
||||
0x03, 0xfc, 0x00, 0x00,
|
||||
0x03, 0xf8, 0x00, 0x00,
|
||||
0x07, 0xf8, 0x00, 0x00,
|
||||
0x07, 0xf8, 0x00, 0x00,
|
||||
0x0f, 0xf0, 0x00, 0x00,
|
||||
0x0f, 0xf0, 0x00, 0x00,
|
||||
0x0f, 0xe0, 0x00, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x00,
|
||||
0x1f, 0xc0, 0x00, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '7'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0037[] = {
|
||||
{ /* .left = '2' */ 50, /* .offset = */ -1 },
|
||||
{ /* .left = '4' */ 52, /* .offset = */ -1 },
|
||||
{ /* .left = '7' */ 55, /* .offset = */ 1 },
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '7'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0037 = {
|
||||
.glyph = 55,
|
||||
.left = 2,
|
||||
.top = 28,
|
||||
.advance = 23,
|
||||
.cols = 20,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_0037,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0037,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '8'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_0038[] = {
|
||||
0x03, 0xfe, 0x00, 0x00,
|
||||
0x0f, 0xff, 0x80, 0x00,
|
||||
0x1f, 0xff, 0xc0, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0x00,
|
||||
0x7f, 0xff, 0xf0, 0x00,
|
||||
0x7f, 0x8f, 0xf0, 0x00,
|
||||
0x7f, 0x07, 0xf0, 0x00,
|
||||
0x7f, 0x07, 0xf0, 0x00,
|
||||
0x7f, 0x8f, 0xf0, 0x00,
|
||||
0x3f, 0xdf, 0xe0, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0x00,
|
||||
0x1f, 0xff, 0xc0, 0x00,
|
||||
0x0f, 0xff, 0x80, 0x00,
|
||||
0x07, 0xfe, 0x00, 0x00,
|
||||
0x0f, 0xff, 0x80, 0x00,
|
||||
0x3f, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xff, 0xe0, 0x00,
|
||||
0x7f, 0x8f, 0xf0, 0x00,
|
||||
0x7f, 0x07, 0xf0, 0x00,
|
||||
0xfe, 0x03, 0xf8, 0x00,
|
||||
0xfe, 0x03, 0xf8, 0x00,
|
||||
0xfe, 0x03, 0xf8, 0x00,
|
||||
0x7f, 0x07, 0xf0, 0x00,
|
||||
0x7f, 0xff, 0xf0, 0x00,
|
||||
0x7f, 0xff, 0xf0, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0x00,
|
||||
0x0f, 0xff, 0x80, 0x00,
|
||||
0x03, 0xfe, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '8'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0038[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '8'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0038 = {
|
||||
.glyph = 56,
|
||||
.left = 1,
|
||||
.top = 28,
|
||||
.advance = 23,
|
||||
.cols = 21,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_0038,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0038,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '9'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_0039[] = {
|
||||
0x03, 0xf8, 0x00, 0x00,
|
||||
0x0f, 0xff, 0x00, 0x00,
|
||||
0x1f, 0xff, 0x80, 0x00,
|
||||
0x3f, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xff, 0xe0, 0x00,
|
||||
0x7f, 0xff, 0xe0, 0x00,
|
||||
0xff, 0x0f, 0xf0, 0x00,
|
||||
0xff, 0x07, 0xf0, 0x00,
|
||||
0xfe, 0x07, 0xf0, 0x00,
|
||||
0xfe, 0x07, 0xf0, 0x00,
|
||||
0xfe, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x0f, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0x7f, 0xff, 0xf8, 0x00,
|
||||
0x7f, 0xff, 0xf8, 0x00,
|
||||
0x3f, 0xfb, 0xf8, 0x00,
|
||||
0x1f, 0xf3, 0xf0, 0x00,
|
||||
0x07, 0xe7, 0xf0, 0x00,
|
||||
0x00, 0x07, 0xf0, 0x00,
|
||||
0x00, 0x1f, 0xf0, 0x00,
|
||||
0x00, 0x7f, 0xe0, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0x00,
|
||||
0x3f, 0xff, 0xc0, 0x00,
|
||||
0x3f, 0xff, 0x80, 0x00,
|
||||
0x3f, 0xff, 0x00, 0x00,
|
||||
0x3f, 0xfc, 0x00, 0x00,
|
||||
0x3f, 0xe0, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '9'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0039[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '9'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0039 = {
|
||||
.glyph = 57,
|
||||
.left = 1,
|
||||
.top = 28,
|
||||
.advance = 23,
|
||||
.cols = 21,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_0039,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0039,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character ':'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_003a[] = {
|
||||
0x7c, 0x00,
|
||||
0xfe, 0x00,
|
||||
0xfe, 0x00,
|
||||
0xff, 0x00,
|
||||
0xfe, 0x00,
|
||||
0xfe, 0x00,
|
||||
0x7c, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x7c, 0x00,
|
||||
0xfe, 0x00,
|
||||
0xfe, 0x00,
|
||||
0xff, 0x00,
|
||||
0xfe, 0x00,
|
||||
0xfe, 0x00,
|
||||
0x7c, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character ':'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_003a[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character ':'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_003a = {
|
||||
.glyph = 58,
|
||||
.left = 2,
|
||||
.top = 22,
|
||||
.advance = 11,
|
||||
.cols = 8,
|
||||
.rows = 22,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_003a,
|
||||
.kerning = kerning_OpenSansExtraBold_28_003a,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character 'A'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_0041[] = {
|
||||
0x00, 0x7f, 0xe0, 0x00,
|
||||
0x00, 0xff, 0xe0, 0x00,
|
||||
0x00, 0xff, 0xf0, 0x00,
|
||||
0x00, 0xff, 0xf0, 0x00,
|
||||
0x01, 0xff, 0xf0, 0x00,
|
||||
0x01, 0xff, 0xf8, 0x00,
|
||||
0x01, 0xff, 0xf8, 0x00,
|
||||
0x01, 0xf9, 0xf8, 0x00,
|
||||
0x03, 0xf9, 0xfc, 0x00,
|
||||
0x03, 0xf9, 0xfc, 0x00,
|
||||
0x03, 0xf9, 0xfc, 0x00,
|
||||
0x07, 0xf0, 0xfe, 0x00,
|
||||
0x07, 0xf0, 0xfe, 0x00,
|
||||
0x07, 0xf0, 0xfe, 0x00,
|
||||
0x0f, 0xf0, 0xff, 0x00,
|
||||
0x0f, 0xf0, 0x7f, 0x00,
|
||||
0x0f, 0xe0, 0x7f, 0x00,
|
||||
0x1f, 0xff, 0xff, 0x80,
|
||||
0x1f, 0xff, 0xff, 0x80,
|
||||
0x1f, 0xff, 0xff, 0x80,
|
||||
0x3f, 0xff, 0xff, 0xc0,
|
||||
0x3f, 0xff, 0xff, 0xc0,
|
||||
0x3f, 0xff, 0xff, 0xc0,
|
||||
0x7f, 0xc0, 0x1f, 0xe0,
|
||||
0x7f, 0x80, 0x1f, 0xe0,
|
||||
0x7f, 0x80, 0x1f, 0xe0,
|
||||
0xff, 0x80, 0x1f, 0xf0,
|
||||
0xff, 0x00, 0x0f, 0xf0,
|
||||
};
|
||||
|
||||
/** Kerning table for character 'A'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0041[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character 'A'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0041 = {
|
||||
.glyph = 65,
|
||||
.left = 0,
|
||||
.top = 28,
|
||||
.advance = 28,
|
||||
.cols = 28,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_0041,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0041,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character 'M'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_004d[] = {
|
||||
0xff, 0xc0, 0x03, 0xff,
|
||||
0xff, 0xe0, 0x07, 0xff,
|
||||
0xff, 0xe0, 0x07, 0xff,
|
||||
0xff, 0xe0, 0x07, 0xff,
|
||||
0xff, 0xe0, 0x07, 0xff,
|
||||
0xff, 0xf0, 0x0f, 0xff,
|
||||
0xff, 0xf0, 0x0f, 0xff,
|
||||
0xff, 0xf0, 0x0f, 0xff,
|
||||
0xfd, 0xf8, 0x1f, 0xff,
|
||||
0xfd, 0xf8, 0x1f, 0xff,
|
||||
0xfd, 0xf8, 0x1f, 0x7f,
|
||||
0xfe, 0xf8, 0x1f, 0x7f,
|
||||
0xfe, 0xfc, 0x3f, 0x7f,
|
||||
0xfe, 0xfc, 0x3f, 0x7f,
|
||||
0xfe, 0xfc, 0x3e, 0x7f,
|
||||
0xfe, 0x7e, 0x7e, 0x7f,
|
||||
0xfe, 0x7e, 0x7e, 0x7f,
|
||||
0xfe, 0x7e, 0x7c, 0x7f,
|
||||
0xfe, 0x3f, 0x7c, 0x7f,
|
||||
0xfe, 0x3f, 0xfc, 0x7f,
|
||||
0xfe, 0x3f, 0xfc, 0x7f,
|
||||
0xfe, 0x3f, 0xf8, 0x7f,
|
||||
0xfe, 0x1f, 0xf8, 0x7f,
|
||||
0xfe, 0x1f, 0xf8, 0x7f,
|
||||
0xfe, 0x1f, 0xf0, 0x7f,
|
||||
0xfe, 0x0f, 0xf0, 0x7f,
|
||||
0xfe, 0x0f, 0xf0, 0x7f,
|
||||
0xfe, 0x0f, 0xf0, 0x7f,
|
||||
};
|
||||
|
||||
/** Kerning table for character 'M'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_004d[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character 'M'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_004d = {
|
||||
.glyph = 77,
|
||||
.left = 3,
|
||||
.top = 28,
|
||||
.advance = 38,
|
||||
.cols = 32,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_004d,
|
||||
.kerning = kerning_OpenSansExtraBold_28_004d,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character 'P'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_28_0050[] = {
|
||||
0xff, 0xfc, 0x00, 0x00,
|
||||
0xff, 0xff, 0x80, 0x00,
|
||||
0xff, 0xff, 0xc0, 0x00,
|
||||
0xff, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0x0f, 0xf0, 0x00,
|
||||
0xff, 0x07, 0xf0, 0x00,
|
||||
0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xf0, 0x00,
|
||||
0xff, 0x0f, 0xf0, 0x00,
|
||||
0xff, 0x1f, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xc0, 0x00,
|
||||
0xff, 0xff, 0x00, 0x00,
|
||||
0xff, 0xfc, 0x00, 0x00,
|
||||
0xff, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0x00, 0x00,
|
||||
0xff, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character 'P'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_28_0050[] = {
|
||||
{ /* .left = '7' */ 55, /* .offset = */ -2 },
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character 'P'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_28_0050 = {
|
||||
.glyph = 80,
|
||||
.left = 3,
|
||||
.top = 28,
|
||||
.advance = 25,
|
||||
.cols = 21,
|
||||
.rows = 28,
|
||||
.bitmap = bitmap_OpenSansExtraBold_28_0050,
|
||||
.kerning = kerning_OpenSansExtraBold_28_0050,
|
||||
};
|
||||
|
||||
/** Glyphs table for font "Open Sans". */
|
||||
static const struct glyph *glyphs_OpenSansExtraBold_28[] = {
|
||||
&glyph_OpenSansExtraBold_28_0020, /* U+0020 ' ' */
|
||||
&glyph_OpenSansExtraBold_28_0030, /* U+0030 '0' */
|
||||
&glyph_OpenSansExtraBold_28_0031, /* U+0031 '1' */
|
||||
&glyph_OpenSansExtraBold_28_0032, /* U+0032 '2' */
|
||||
&glyph_OpenSansExtraBold_28_0033, /* U+0033 '3' */
|
||||
&glyph_OpenSansExtraBold_28_0034, /* U+0034 '4' */
|
||||
&glyph_OpenSansExtraBold_28_0035, /* U+0035 '5' */
|
||||
&glyph_OpenSansExtraBold_28_0036, /* U+0036 '6' */
|
||||
&glyph_OpenSansExtraBold_28_0037, /* U+0037 '7' */
|
||||
&glyph_OpenSansExtraBold_28_0038, /* U+0038 '8' */
|
||||
&glyph_OpenSansExtraBold_28_0039, /* U+0039 '9' */
|
||||
&glyph_OpenSansExtraBold_28_003a, /* U+003A ':' */
|
||||
&glyph_OpenSansExtraBold_28_0041, /* U+0041 'A' */
|
||||
&glyph_OpenSansExtraBold_28_004d, /* U+004D 'M' */
|
||||
&glyph_OpenSansExtraBold_28_0050, /* U+0050 'P' */
|
||||
};
|
||||
|
||||
/** Definition for font "Open Sans". */
|
||||
const struct font font_OpenSansExtraBold_28 = {
|
||||
.name = "Open Sans",
|
||||
.style = "ExtraBold",
|
||||
.size = 28,
|
||||
.dpi = 100,
|
||||
.count = 15,
|
||||
.max = 80,
|
||||
.ascender = 42,
|
||||
.descender = -12,
|
||||
.height = 53,
|
||||
.glyphs = glyphs_OpenSansExtraBold_28,
|
||||
.compressed = 0,
|
||||
};
|
||||
|
||||
15
lib/fonts/font-OpenSansExtraBold-28.h
Normal file
15
lib/fonts/font-OpenSansExtraBold-28.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/* AUTOMATICALLY GENERATED FILE! EDITING NOT RECOMMENDED!
|
||||
*
|
||||
* This file is distributed under the terms of the MIT License.
|
||||
* See the LICENSE file at the top of this tree, or if it is missing a copy can
|
||||
* be found at http://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#ifndef _FONTEM_OpenSansExtraBold_28_H
|
||||
#define _FONTEM_OpenSansExtraBold_28_H
|
||||
|
||||
#include "fontem.h"
|
||||
|
||||
extern const struct font font_OpenSansExtraBold_28;
|
||||
|
||||
#endif /* _FONTEM_OpenSansExtraBold_28_H */
|
||||
793
lib/fonts/font-OpenSansExtraBold-32.c
Normal file
793
lib/fonts/font-OpenSansExtraBold-32.c
Normal file
@@ -0,0 +1,793 @@
|
||||
/* AUTOMATICALLY GENERATED FILE! EDITING NOT RECOMMENDED!
|
||||
*
|
||||
* This file is distributed under the terms of the MIT License.
|
||||
* See the LICENSE file at the top of this tree, or if it is missing a copy can
|
||||
* be found at http://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "fontem.h"
|
||||
#include "font-OpenSansExtraBold-32.h"
|
||||
|
||||
/* Character list: 0123456789:APM */
|
||||
|
||||
/** Kerning table for character ' '. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0020[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character ' '. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0020 = {
|
||||
.glyph = 32,
|
||||
.left = 0,
|
||||
.top = 0,
|
||||
.advance = 11,
|
||||
.cols = 0,
|
||||
.rows = 0,
|
||||
.bitmap = NULL,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0020,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '0'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_0030[] = {
|
||||
0x01, 0xfe, 0x00, 0x00,
|
||||
0x07, 0xff, 0x80, 0x00,
|
||||
0x1f, 0xff, 0xc0, 0x00,
|
||||
0x1f, 0xff, 0xe0, 0x00,
|
||||
0x3f, 0xff, 0xf0, 0x00,
|
||||
0x7f, 0xff, 0xf0, 0x00,
|
||||
0x7f, 0xff, 0xf8, 0x00,
|
||||
0x7f, 0xcf, 0xf8, 0x00,
|
||||
0xff, 0x87, 0xfc, 0x00,
|
||||
0xff, 0x07, 0xfc, 0x00,
|
||||
0xff, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x07, 0xfc, 0x00,
|
||||
0xff, 0x87, 0xfc, 0x00,
|
||||
0x7f, 0xcf, 0xf8, 0x00,
|
||||
0x7f, 0xff, 0xf8, 0x00,
|
||||
0x7f, 0xff, 0xf8, 0x00,
|
||||
0x3f, 0xff, 0xf0, 0x00,
|
||||
0x1f, 0xff, 0xe0, 0x00,
|
||||
0x0f, 0xff, 0xe0, 0x00,
|
||||
0x07, 0xff, 0x80, 0x00,
|
||||
0x01, 0xfe, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '0'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0030[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '0'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0030 = {
|
||||
.glyph = 48,
|
||||
.left = 2,
|
||||
.top = 31,
|
||||
.advance = 26,
|
||||
.cols = 22,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_0030,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0030,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '1'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_0031[] = {
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x7f, 0xc0, 0x00,
|
||||
0x00, 0xff, 0xc0, 0x00,
|
||||
0x03, 0xff, 0xc0, 0x00,
|
||||
0x07, 0xff, 0xc0, 0x00,
|
||||
0x0f, 0xff, 0xc0, 0x00,
|
||||
0x1f, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xff, 0xc0, 0x00,
|
||||
0xff, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xbf, 0xc0, 0x00,
|
||||
0x3f, 0x3f, 0xc0, 0x00,
|
||||
0x1c, 0x3f, 0xc0, 0x00,
|
||||
0x08, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '1'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0031[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '1'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0031 = {
|
||||
.glyph = 49,
|
||||
.left = 2,
|
||||
.top = 31,
|
||||
.advance = 26,
|
||||
.cols = 18,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_0031,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0031,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '2'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_0032[] = {
|
||||
0x00, 0xff, 0x00, 0x00,
|
||||
0x07, 0xff, 0xc0, 0x00,
|
||||
0x1f, 0xff, 0xf0, 0x00,
|
||||
0x3f, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xfc, 0x00,
|
||||
0xff, 0xff, 0xfc, 0x00,
|
||||
0x7f, 0xff, 0xfc, 0x00,
|
||||
0x3f, 0x87, 0xfe, 0x00,
|
||||
0x1e, 0x03, 0xfe, 0x00,
|
||||
0x0c, 0x03, 0xfe, 0x00,
|
||||
0x00, 0x03, 0xfe, 0x00,
|
||||
0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x07, 0xfc, 0x00,
|
||||
0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x1f, 0xf8, 0x00,
|
||||
0x00, 0x1f, 0xf0, 0x00,
|
||||
0x00, 0x3f, 0xe0, 0x00,
|
||||
0x00, 0x7f, 0xc0, 0x00,
|
||||
0x00, 0xff, 0x80, 0x00,
|
||||
0x03, 0xff, 0x00, 0x00,
|
||||
0x07, 0xfe, 0x00, 0x00,
|
||||
0x0f, 0xfc, 0x00, 0x00,
|
||||
0x1f, 0xf8, 0x00, 0x00,
|
||||
0x3f, 0xf0, 0x00, 0x00,
|
||||
0x7f, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '2'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0032[] = {
|
||||
{ /* .left = '7' */ 55, /* .offset = */ -1 },
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '2'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0032 = {
|
||||
.glyph = 50,
|
||||
.left = 1,
|
||||
.top = 31,
|
||||
.advance = 26,
|
||||
.cols = 23,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_0032,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0032,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '3'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_0033[] = {
|
||||
0x03, 0xfe, 0x00, 0x00,
|
||||
0x1f, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0x7f, 0xff, 0xf8, 0x00,
|
||||
0x3f, 0xff, 0xf8, 0x00,
|
||||
0x3c, 0x0f, 0xf8, 0x00,
|
||||
0x10, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x1f, 0xf0, 0x00,
|
||||
0x0f, 0xff, 0xe0, 0x00,
|
||||
0x0f, 0xff, 0xc0, 0x00,
|
||||
0x0f, 0xff, 0x00, 0x00,
|
||||
0x0f, 0xff, 0x00, 0x00,
|
||||
0x0f, 0xff, 0xe0, 0x00,
|
||||
0x0f, 0xff, 0xf0, 0x00,
|
||||
0x0f, 0xff, 0xf8, 0x00,
|
||||
0x00, 0x1f, 0xfc, 0x00,
|
||||
0x00, 0x07, 0xfc, 0x00,
|
||||
0x00, 0x07, 0xfc, 0x00,
|
||||
0x80, 0x07, 0xfc, 0x00,
|
||||
0xf0, 0x0f, 0xfc, 0x00,
|
||||
0xff, 0xff, 0xfc, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xff, 0x80, 0x00,
|
||||
0x0f, 0xfc, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '3'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0033[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '3'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0033 = {
|
||||
.glyph = 51,
|
||||
.left = 2,
|
||||
.top = 31,
|
||||
.advance = 26,
|
||||
.cols = 22,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_0033,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0033,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '4'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_0034[] = {
|
||||
0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x1f, 0xf8, 0x00,
|
||||
0x00, 0x1f, 0xf8, 0x00,
|
||||
0x00, 0x3f, 0xf8, 0x00,
|
||||
0x00, 0x7f, 0xf8, 0x00,
|
||||
0x00, 0xff, 0xf8, 0x00,
|
||||
0x00, 0xff, 0xf8, 0x00,
|
||||
0x01, 0xff, 0xf8, 0x00,
|
||||
0x03, 0xff, 0xf8, 0x00,
|
||||
0x03, 0xff, 0xf8, 0x00,
|
||||
0x07, 0xff, 0xf8, 0x00,
|
||||
0x0f, 0xef, 0xf8, 0x00,
|
||||
0x0f, 0xef, 0xf8, 0x00,
|
||||
0x1f, 0xcf, 0xf8, 0x00,
|
||||
0x3f, 0xcf, 0xf8, 0x00,
|
||||
0x3f, 0x8f, 0xf8, 0x00,
|
||||
0x7f, 0x0f, 0xf8, 0x00,
|
||||
0xfe, 0x0f, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0x00,
|
||||
0xff, 0xff, 0xff, 0x00,
|
||||
0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x0f, 0xf8, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '4'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0034[] = {
|
||||
{ /* .left = '7' */ 55, /* .offset = */ -1 },
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '4'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0034 = {
|
||||
.glyph = 52,
|
||||
.left = 1,
|
||||
.top = 31,
|
||||
.advance = 26,
|
||||
.cols = 24,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_0034,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0034,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '5'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_0035[] = {
|
||||
0x3f, 0xff, 0xf0, 0x00,
|
||||
0x3f, 0xff, 0xf0, 0x00,
|
||||
0x3f, 0xff, 0xf0, 0x00,
|
||||
0x3f, 0xff, 0xf0, 0x00,
|
||||
0x7f, 0xff, 0xf0, 0x00,
|
||||
0x7f, 0xff, 0xf0, 0x00,
|
||||
0x7f, 0xff, 0xf0, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00,
|
||||
0x7f, 0xff, 0x00, 0x00,
|
||||
0x7f, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xff, 0xe0, 0x00,
|
||||
0x7f, 0xff, 0xf0, 0x00,
|
||||
0x7f, 0xff, 0xf8, 0x00,
|
||||
0x7f, 0xff, 0xf8, 0x00,
|
||||
0x7f, 0xff, 0xfc, 0x00,
|
||||
0x18, 0x1f, 0xfc, 0x00,
|
||||
0x00, 0x07, 0xfc, 0x00,
|
||||
0x00, 0x07, 0xfc, 0x00,
|
||||
0x00, 0x07, 0xfc, 0x00,
|
||||
0x80, 0x07, 0xfc, 0x00,
|
||||
0xf8, 0x0f, 0xfc, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xe0, 0x00,
|
||||
0x7f, 0xff, 0x80, 0x00,
|
||||
0x0f, 0xfc, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '5'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0035[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '5'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0035 = {
|
||||
.glyph = 53,
|
||||
.left = 2,
|
||||
.top = 31,
|
||||
.advance = 26,
|
||||
.cols = 22,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_0035,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0035,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '6'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_0036[] = {
|
||||
0x00, 0x1f, 0xf8, 0x00,
|
||||
0x00, 0xff, 0xf8, 0x00,
|
||||
0x03, 0xff, 0xf8, 0x00,
|
||||
0x07, 0xff, 0xf8, 0x00,
|
||||
0x1f, 0xff, 0xf8, 0x00,
|
||||
0x1f, 0xff, 0xf8, 0x00,
|
||||
0x3f, 0xff, 0xf8, 0x00,
|
||||
0x7f, 0xf0, 0x00, 0x00,
|
||||
0x7f, 0xc0, 0x00, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00,
|
||||
0xff, 0x1f, 0x80, 0x00,
|
||||
0xff, 0x7f, 0xe0, 0x00,
|
||||
0xfe, 0xff, 0xf0, 0x00,
|
||||
0xfe, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xfc, 0x00,
|
||||
0xff, 0xff, 0xfc, 0x00,
|
||||
0xff, 0xff, 0xfc, 0x00,
|
||||
0xff, 0x87, 0xfc, 0x00,
|
||||
0xff, 0x03, 0xfe, 0x00,
|
||||
0xff, 0x03, 0xfe, 0x00,
|
||||
0xff, 0x03, 0xfe, 0x00,
|
||||
0xff, 0x03, 0xfe, 0x00,
|
||||
0xff, 0x83, 0xfc, 0x00,
|
||||
0xff, 0xc7, 0xfc, 0x00,
|
||||
0x7f, 0xff, 0xfc, 0x00,
|
||||
0x7f, 0xff, 0xfc, 0x00,
|
||||
0x3f, 0xff, 0xf8, 0x00,
|
||||
0x1f, 0xff, 0xf0, 0x00,
|
||||
0x0f, 0xff, 0xe0, 0x00,
|
||||
0x07, 0xff, 0xc0, 0x00,
|
||||
0x00, 0xfe, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '6'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0036[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '6'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0036 = {
|
||||
.glyph = 54,
|
||||
.left = 2,
|
||||
.top = 31,
|
||||
.advance = 26,
|
||||
.cols = 23,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_0036,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0036,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '7'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_0037[] = {
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfc, 0x00,
|
||||
0xff, 0xff, 0xfc, 0x00,
|
||||
0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x1f, 0xf0, 0x00,
|
||||
0x00, 0x1f, 0xe0, 0x00,
|
||||
0x00, 0x1f, 0xe0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x7f, 0xc0, 0x00,
|
||||
0x00, 0x7f, 0x80, 0x00,
|
||||
0x00, 0xff, 0x80, 0x00,
|
||||
0x00, 0xff, 0x00, 0x00,
|
||||
0x01, 0xff, 0x00, 0x00,
|
||||
0x01, 0xfe, 0x00, 0x00,
|
||||
0x03, 0xfe, 0x00, 0x00,
|
||||
0x03, 0xfe, 0x00, 0x00,
|
||||
0x03, 0xfc, 0x00, 0x00,
|
||||
0x07, 0xfc, 0x00, 0x00,
|
||||
0x07, 0xf8, 0x00, 0x00,
|
||||
0x0f, 0xf8, 0x00, 0x00,
|
||||
0x0f, 0xf0, 0x00, 0x00,
|
||||
0x1f, 0xf0, 0x00, 0x00,
|
||||
0x1f, 0xf0, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '7'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0037[] = {
|
||||
{ /* .left = '2' */ 50, /* .offset = */ -1 },
|
||||
{ /* .left = '4' */ 52, /* .offset = */ -1 },
|
||||
{ /* .left = '7' */ 55, /* .offset = */ 1 },
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '7'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0037 = {
|
||||
.glyph = 55,
|
||||
.left = 2,
|
||||
.top = 31,
|
||||
.advance = 26,
|
||||
.cols = 23,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_0037,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0037,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '8'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_0038[] = {
|
||||
0x00, 0xff, 0x80, 0x00,
|
||||
0x07, 0xff, 0xe0, 0x00,
|
||||
0x0f, 0xff, 0xf8, 0x00,
|
||||
0x1f, 0xff, 0xf8, 0x00,
|
||||
0x3f, 0xff, 0xfc, 0x00,
|
||||
0x3f, 0xff, 0xfc, 0x00,
|
||||
0x7f, 0xc3, 0xfe, 0x00,
|
||||
0x7f, 0x81, 0xfe, 0x00,
|
||||
0x7f, 0x81, 0xfe, 0x00,
|
||||
0x3f, 0xc3, 0xfc, 0x00,
|
||||
0x3f, 0xe7, 0xfc, 0x00,
|
||||
0x1f, 0xff, 0xf8, 0x00,
|
||||
0x1f, 0xff, 0xf8, 0x00,
|
||||
0x0f, 0xff, 0xe0, 0x00,
|
||||
0x03, 0xff, 0xc0, 0x00,
|
||||
0x07, 0xff, 0xc0, 0x00,
|
||||
0x0f, 0xff, 0xf0, 0x00,
|
||||
0x3f, 0xff, 0xf8, 0x00,
|
||||
0x3f, 0xff, 0xfc, 0x00,
|
||||
0x7f, 0xc7, 0xfe, 0x00,
|
||||
0x7f, 0x81, 0xfe, 0x00,
|
||||
0x7f, 0x00, 0xfe, 0x00,
|
||||
0xff, 0x00, 0xff, 0x00,
|
||||
0xff, 0x80, 0xff, 0x00,
|
||||
0x7f, 0xc1, 0xfe, 0x00,
|
||||
0x7f, 0xff, 0xfe, 0x00,
|
||||
0x7f, 0xff, 0xfe, 0x00,
|
||||
0x3f, 0xff, 0xfc, 0x00,
|
||||
0x1f, 0xff, 0xf8, 0x00,
|
||||
0x0f, 0xff, 0xe0, 0x00,
|
||||
0x01, 0xff, 0x80, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '8'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0038[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '8'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0038 = {
|
||||
.glyph = 56,
|
||||
.left = 1,
|
||||
.top = 31,
|
||||
.advance = 26,
|
||||
.cols = 24,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_0038,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0038,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '9'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_0039[] = {
|
||||
0x01, 0xfe, 0x00, 0x00,
|
||||
0x07, 0xff, 0xc0, 0x00,
|
||||
0x0f, 0xff, 0xe0, 0x00,
|
||||
0x1f, 0xff, 0xf0, 0x00,
|
||||
0x3f, 0xff, 0xf8, 0x00,
|
||||
0x7f, 0xff, 0xfc, 0x00,
|
||||
0x7f, 0xff, 0xfc, 0x00,
|
||||
0x7f, 0xc7, 0xfe, 0x00,
|
||||
0xff, 0x83, 0xfe, 0x00,
|
||||
0xff, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x81, 0xfe, 0x00,
|
||||
0xff, 0xc7, 0xff, 0x00,
|
||||
0x7f, 0xff, 0xff, 0x00,
|
||||
0x7f, 0xff, 0xff, 0x00,
|
||||
0x7f, 0xff, 0xfe, 0x00,
|
||||
0x3f, 0xfe, 0xfe, 0x00,
|
||||
0x1f, 0xfe, 0xfe, 0x00,
|
||||
0x0f, 0xfd, 0xfe, 0x00,
|
||||
0x03, 0xf1, 0xfe, 0x00,
|
||||
0x00, 0x03, 0xfe, 0x00,
|
||||
0x00, 0x07, 0xfc, 0x00,
|
||||
0x00, 0x3f, 0xfc, 0x00,
|
||||
0x3f, 0xff, 0xf8, 0x00,
|
||||
0x3f, 0xff, 0xf8, 0x00,
|
||||
0x3f, 0xff, 0xf0, 0x00,
|
||||
0x3f, 0xff, 0xe0, 0x00,
|
||||
0x3f, 0xff, 0xc0, 0x00,
|
||||
0x3f, 0xff, 0x00, 0x00,
|
||||
0x3f, 0xf0, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character '9'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0039[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character '9'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0039 = {
|
||||
.glyph = 57,
|
||||
.left = 1,
|
||||
.top = 31,
|
||||
.advance = 26,
|
||||
.cols = 24,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_0039,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0039,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character ':'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_003a[] = {
|
||||
0x3e, 0x00,
|
||||
0x7f, 0x00,
|
||||
0xff, 0x80,
|
||||
0xff, 0x80,
|
||||
0xff, 0x80,
|
||||
0xff, 0x80,
|
||||
0x7f, 0x00,
|
||||
0x3e, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x00, 0x00,
|
||||
0x3e, 0x00,
|
||||
0x7f, 0x00,
|
||||
0xff, 0x80,
|
||||
0xff, 0x80,
|
||||
0xff, 0x80,
|
||||
0xff, 0x80,
|
||||
0x7f, 0x00,
|
||||
0x3e, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character ':'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_003a[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character ':'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_003a = {
|
||||
.glyph = 58,
|
||||
.left = 2,
|
||||
.top = 25,
|
||||
.advance = 13,
|
||||
.cols = 9,
|
||||
.rows = 25,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_003a,
|
||||
.kerning = kerning_OpenSansExtraBold_32_003a,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character 'A'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_0041[] = {
|
||||
0x00, 0x3f, 0xfc, 0x00,
|
||||
0x00, 0x3f, 0xfc, 0x00,
|
||||
0x00, 0x7f, 0xfc, 0x00,
|
||||
0x00, 0x7f, 0xfe, 0x00,
|
||||
0x00, 0x7f, 0xfe, 0x00,
|
||||
0x00, 0xff, 0xfe, 0x00,
|
||||
0x00, 0xff, 0xff, 0x00,
|
||||
0x00, 0xfe, 0xff, 0x00,
|
||||
0x01, 0xfe, 0x7f, 0x00,
|
||||
0x01, 0xfe, 0x7f, 0x80,
|
||||
0x01, 0xfe, 0x7f, 0x80,
|
||||
0x03, 0xfc, 0x3f, 0x80,
|
||||
0x03, 0xfc, 0x3f, 0xc0,
|
||||
0x03, 0xfc, 0x3f, 0xc0,
|
||||
0x07, 0xfc, 0x3f, 0xc0,
|
||||
0x07, 0xf8, 0x1f, 0xe0,
|
||||
0x07, 0xf8, 0x1f, 0xe0,
|
||||
0x0f, 0xf8, 0x1f, 0xe0,
|
||||
0x0f, 0xff, 0xff, 0xf0,
|
||||
0x0f, 0xff, 0xff, 0xf0,
|
||||
0x1f, 0xff, 0xff, 0xf0,
|
||||
0x1f, 0xff, 0xff, 0xf8,
|
||||
0x1f, 0xff, 0xff, 0xf8,
|
||||
0x3f, 0xff, 0xff, 0xf8,
|
||||
0x3f, 0xff, 0xff, 0xfc,
|
||||
0x3f, 0xe0, 0x07, 0xfc,
|
||||
0x7f, 0xe0, 0x03, 0xfc,
|
||||
0x7f, 0xc0, 0x03, 0xfe,
|
||||
0x7f, 0xc0, 0x03, 0xfe,
|
||||
0xff, 0xc0, 0x03, 0xff,
|
||||
0xff, 0x80, 0x01, 0xff,
|
||||
};
|
||||
|
||||
/** Kerning table for character 'A'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0041[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character 'A'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0041 = {
|
||||
.glyph = 65,
|
||||
.left = 0,
|
||||
.top = 31,
|
||||
.advance = 32,
|
||||
.cols = 32,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_0041,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0041,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character 'M'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_004d[] = {
|
||||
0xff, 0xf0, 0x00, 0x7f, 0xf8, 0x00,
|
||||
0xff, 0xf0, 0x00, 0x7f, 0xf8, 0x00,
|
||||
0xff, 0xf8, 0x00, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xf8, 0x00, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xf8, 0x00, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xf8, 0x00, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xfc, 0x01, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xfc, 0x01, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xfc, 0x01, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xfe, 0x03, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xfe, 0x03, 0xf7, 0xf8, 0x00,
|
||||
0xff, 0x7e, 0x03, 0xf7, 0xf8, 0x00,
|
||||
0xff, 0x7f, 0x07, 0xf7, 0xf8, 0x00,
|
||||
0xff, 0x7f, 0x07, 0xf7, 0xf8, 0x00,
|
||||
0xff, 0x7f, 0x07, 0xe7, 0xf8, 0x00,
|
||||
0xff, 0x3f, 0x87, 0xe7, 0xf8, 0x00,
|
||||
0xff, 0x3f, 0x8f, 0xe7, 0xf8, 0x00,
|
||||
0xff, 0x3f, 0x8f, 0xc7, 0xf8, 0x00,
|
||||
0xff, 0x1f, 0x8f, 0xc7, 0xf8, 0x00,
|
||||
0xff, 0x1f, 0xdf, 0xc7, 0xf8, 0x00,
|
||||
0xff, 0x1f, 0xdf, 0x87, 0xf8, 0x00,
|
||||
0xff, 0x0f, 0xdf, 0x87, 0xf8, 0x00,
|
||||
0xff, 0x0f, 0xff, 0x87, 0xf8, 0x00,
|
||||
0xff, 0x0f, 0xff, 0x87, 0xf8, 0x00,
|
||||
0xff, 0x0f, 0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xff, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x07, 0xfe, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x03, 0xfe, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x03, 0xfe, 0x07, 0xf8, 0x00,
|
||||
0xff, 0x03, 0xfe, 0x07, 0xf8, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character 'M'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_004d[] = {
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character 'M'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_004d = {
|
||||
.glyph = 77,
|
||||
.left = 3,
|
||||
.top = 31,
|
||||
.advance = 43,
|
||||
.cols = 37,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_004d,
|
||||
.kerning = kerning_OpenSansExtraBold_32_004d,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character 'P'. */
|
||||
static const uint8_t bitmap_OpenSansExtraBold_32_0050[] = {
|
||||
0xff, 0xff, 0x00, 0x00,
|
||||
0xff, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xfc, 0x00,
|
||||
0xff, 0xff, 0xfc, 0x00,
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0x87, 0xfe, 0x00,
|
||||
0xff, 0x83, 0xfe, 0x00,
|
||||
0xff, 0x81, 0xfe, 0x00,
|
||||
0xff, 0x81, 0xfe, 0x00,
|
||||
0xff, 0x81, 0xfe, 0x00,
|
||||
0xff, 0x83, 0xfe, 0x00,
|
||||
0xff, 0x87, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xfc, 0x00,
|
||||
0xff, 0xff, 0xfc, 0x00,
|
||||
0xff, 0xff, 0xf8, 0x00,
|
||||
0xff, 0xff, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xc0, 0x00,
|
||||
0xff, 0xff, 0x00, 0x00,
|
||||
0xff, 0x80, 0x00, 0x00,
|
||||
0xff, 0x80, 0x00, 0x00,
|
||||
0xff, 0x80, 0x00, 0x00,
|
||||
0xff, 0x80, 0x00, 0x00,
|
||||
0xff, 0x80, 0x00, 0x00,
|
||||
0xff, 0x80, 0x00, 0x00,
|
||||
0xff, 0x80, 0x00, 0x00,
|
||||
0xff, 0x80, 0x00, 0x00,
|
||||
0xff, 0x80, 0x00, 0x00,
|
||||
0xff, 0x80, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Kerning table for character 'P'. */
|
||||
static const struct kerning kerning_OpenSansExtraBold_32_0050[] = {
|
||||
{ /* .left = '7' */ 55, /* .offset = */ -2 },
|
||||
{ /* .left = */ 0, /* .offset = */ 0 },
|
||||
};
|
||||
|
||||
/** Glyph definition for character 'P'. */
|
||||
static const struct glyph glyph_OpenSansExtraBold_32_0050 = {
|
||||
.glyph = 80,
|
||||
.left = 3,
|
||||
.top = 31,
|
||||
.advance = 28,
|
||||
.cols = 23,
|
||||
.rows = 31,
|
||||
.bitmap = bitmap_OpenSansExtraBold_32_0050,
|
||||
.kerning = kerning_OpenSansExtraBold_32_0050,
|
||||
};
|
||||
|
||||
/** Glyphs table for font "Open Sans". */
|
||||
static const struct glyph *glyphs_OpenSansExtraBold_32[] = {
|
||||
&glyph_OpenSansExtraBold_32_0020, /* U+0020 ' ' */
|
||||
&glyph_OpenSansExtraBold_32_0030, /* U+0030 '0' */
|
||||
&glyph_OpenSansExtraBold_32_0031, /* U+0031 '1' */
|
||||
&glyph_OpenSansExtraBold_32_0032, /* U+0032 '2' */
|
||||
&glyph_OpenSansExtraBold_32_0033, /* U+0033 '3' */
|
||||
&glyph_OpenSansExtraBold_32_0034, /* U+0034 '4' */
|
||||
&glyph_OpenSansExtraBold_32_0035, /* U+0035 '5' */
|
||||
&glyph_OpenSansExtraBold_32_0036, /* U+0036 '6' */
|
||||
&glyph_OpenSansExtraBold_32_0037, /* U+0037 '7' */
|
||||
&glyph_OpenSansExtraBold_32_0038, /* U+0038 '8' */
|
||||
&glyph_OpenSansExtraBold_32_0039, /* U+0039 '9' */
|
||||
&glyph_OpenSansExtraBold_32_003a, /* U+003A ':' */
|
||||
&glyph_OpenSansExtraBold_32_0041, /* U+0041 'A' */
|
||||
&glyph_OpenSansExtraBold_32_004d, /* U+004D 'M' */
|
||||
&glyph_OpenSansExtraBold_32_0050, /* U+0050 'P' */
|
||||
};
|
||||
|
||||
/** Definition for font "Open Sans". */
|
||||
const struct font font_OpenSansExtraBold_32 = {
|
||||
.name = "Open Sans",
|
||||
.style = "ExtraBold",
|
||||
.size = 32,
|
||||
.dpi = 100,
|
||||
.count = 15,
|
||||
.max = 80,
|
||||
.ascender = 48,
|
||||
.descender = -14,
|
||||
.height = 61,
|
||||
.glyphs = glyphs_OpenSansExtraBold_32,
|
||||
.compressed = 0,
|
||||
};
|
||||
|
||||
15
lib/fonts/font-OpenSansExtraBold-32.h
Normal file
15
lib/fonts/font-OpenSansExtraBold-32.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/* AUTOMATICALLY GENERATED FILE! EDITING NOT RECOMMENDED!
|
||||
*
|
||||
* This file is distributed under the terms of the MIT License.
|
||||
* See the LICENSE file at the top of this tree, or if it is missing a copy can
|
||||
* be found at http://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#ifndef _FONTEM_OpenSansExtraBold_32_H
|
||||
#define _FONTEM_OpenSansExtraBold_32_H
|
||||
|
||||
#include "fontem.h"
|
||||
|
||||
extern const struct font font_OpenSansExtraBold_32;
|
||||
|
||||
#endif /* _FONTEM_OpenSansExtraBold_32_H */
|
||||
1264
lib/fonts/font-OpenSansExtraBold-64.c
Normal file
1264
lib/fonts/font-OpenSansExtraBold-64.c
Normal file
File diff suppressed because it is too large
Load Diff
15
lib/fonts/font-OpenSansExtraBold-64.h
Normal file
15
lib/fonts/font-OpenSansExtraBold-64.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/* AUTOMATICALLY GENERATED FILE! EDITING NOT RECOMMENDED!
|
||||
*
|
||||
* This file is distributed under the terms of the MIT License.
|
||||
* See the LICENSE file at the top of this tree, or if it is missing a copy can
|
||||
* be found at http://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#ifndef _FONTEM_OpenSansExtraBold_64_H
|
||||
#define _FONTEM_OpenSansExtraBold_64_H
|
||||
|
||||
#include "fontem.h"
|
||||
|
||||
extern const struct font font_OpenSansExtraBold_64;
|
||||
|
||||
#endif /* _FONTEM_OpenSansExtraBold_64_H */
|
||||
File diff suppressed because it is too large
Load Diff
2955
lib/fonts/font-notomono-16.c
Normal file
2955
lib/fonts/font-notomono-16.c
Normal file
File diff suppressed because it is too large
Load Diff
15
lib/fonts/font-notomono-16.h
Normal file
15
lib/fonts/font-notomono-16.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/* AUTOMATICALLY GENERATED FILE! EDITING NOT RECOMMENDED!
|
||||
*
|
||||
* This file is distributed under the terms of the MIT License.
|
||||
* See the LICENSE file at the top of this tree, or if it is missing a copy can
|
||||
* be found at http://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#ifndef _FONTEM_notomono_16_H
|
||||
#define _FONTEM_notomono_16_H
|
||||
|
||||
#include "fontem.h"
|
||||
|
||||
extern const struct font font_notomono_16;
|
||||
|
||||
#endif /* _FONTEM_notomono_16_H */
|
||||
3636
lib/fonts/font-notomono-24.c
Normal file
3636
lib/fonts/font-notomono-24.c
Normal file
File diff suppressed because it is too large
Load Diff
15
lib/fonts/font-notomono-24.h
Normal file
15
lib/fonts/font-notomono-24.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/* AUTOMATICALLY GENERATED FILE! EDITING NOT RECOMMENDED!
|
||||
*
|
||||
* This file is distributed under the terms of the MIT License.
|
||||
* See the LICENSE file at the top of this tree, or if it is missing a copy can
|
||||
* be found at http://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#ifndef _FONTEM_notomono_24_H
|
||||
#define _FONTEM_notomono_24_H
|
||||
|
||||
#include "fontem.h"
|
||||
|
||||
extern const struct font font_notomono_24;
|
||||
|
||||
#endif /* _FONTEM_notomono_24_H */
|
||||
868
lib/fonts/font-notomono-64.c
Normal file
868
lib/fonts/font-notomono-64.c
Normal file
@@ -0,0 +1,868 @@
|
||||
/* AUTOMATICALLY GENERATED FILE! EDITING NOT RECOMMENDED!
|
||||
*
|
||||
* This file is distributed under the terms of the MIT License.
|
||||
* See the LICENSE file at the top of this tree, or if it is missing a copy can
|
||||
* be found at http://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "fontem.h"
|
||||
#include "font-notomono-64.h"
|
||||
|
||||
/* Character list: 0123456789 */
|
||||
|
||||
/** Glyph definition for character ' '. */
|
||||
static const struct glyph glyph_notomono_64_0020 = {
|
||||
.glyph = 32,
|
||||
.left = 0,
|
||||
.top = 0,
|
||||
.advance = 53,
|
||||
.cols = 0,
|
||||
.rows = 0,
|
||||
.bitmap = NULL,
|
||||
.kerning = NULL,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '0'. */
|
||||
static const uint8_t bitmap_notomono_64_0030[] = {
|
||||
0x00, 0x00, 0xff, 0x80, 0x00, 0x00,
|
||||
0x00, 0x07, 0xff, 0xf0, 0x00, 0x00,
|
||||
0x00, 0x1f, 0xff, 0xfc, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xfe, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x01, 0xff, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x03, 0xff, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x03, 0xff, 0x00, 0xff, 0xe0, 0x00,
|
||||
0x07, 0xfe, 0x00, 0x3f, 0xf0, 0x00,
|
||||
0x0f, 0xf8, 0x00, 0x1f, 0xf0, 0x00,
|
||||
0x0f, 0xf0, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x1f, 0xf0, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x01, 0xfc, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0xff, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0xff, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0xff, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0xff, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0xff, 0x00,
|
||||
0xff, 0x00, 0x00, 0x00, 0xff, 0x00,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0xff, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0x7f, 0x00, 0x00, 0x00, 0xff, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0xff, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0xff, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0xff, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0xff, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0xff, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x0f, 0xf0, 0x00, 0x07, 0xfc, 0x00,
|
||||
0x0f, 0xf0, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x07, 0xf8, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x07, 0xfc, 0x00, 0x3f, 0xf0, 0x00,
|
||||
0x03, 0xff, 0x00, 0x7f, 0xe0, 0x00,
|
||||
0x01, 0xff, 0xff, 0xff, 0xe0, 0x00,
|
||||
0x01, 0xff, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x00, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xff, 0x00, 0x00,
|
||||
0x00, 0x1f, 0xff, 0xfc, 0x00, 0x00,
|
||||
0x00, 0x07, 0xff, 0xf0, 0x00, 0x00,
|
||||
0x00, 0x00, 0xff, 0x80, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Glyph definition for character '0'. */
|
||||
static const struct glyph glyph_notomono_64_0030 = {
|
||||
.glyph = 48,
|
||||
.left = 6,
|
||||
.top = 65,
|
||||
.advance = 53,
|
||||
.cols = 41,
|
||||
.rows = 66,
|
||||
.bitmap = bitmap_notomono_64_0030,
|
||||
.kerning = NULL,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '1'. */
|
||||
static const uint8_t bitmap_notomono_64_0031[] = {
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x01, 0xff, 0x00,
|
||||
0x00, 0x03, 0xff, 0x00,
|
||||
0x00, 0x0f, 0xff, 0x00,
|
||||
0x00, 0x1f, 0xff, 0x00,
|
||||
0x00, 0x3f, 0xff, 0x00,
|
||||
0x00, 0xff, 0xff, 0x00,
|
||||
0x01, 0xff, 0xff, 0x00,
|
||||
0x03, 0xff, 0xff, 0x00,
|
||||
0x0f, 0xfe, 0xff, 0x00,
|
||||
0x1f, 0xfc, 0xff, 0x00,
|
||||
0x3f, 0xf8, 0xff, 0x00,
|
||||
0xff, 0xe0, 0xff, 0x00,
|
||||
0x7f, 0xc0, 0xff, 0x00,
|
||||
0x7f, 0x80, 0xff, 0x00,
|
||||
0x3f, 0x00, 0xff, 0x00,
|
||||
0x1c, 0x00, 0xff, 0x00,
|
||||
0x08, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00,
|
||||
};
|
||||
|
||||
/** Glyph definition for character '1'. */
|
||||
static const struct glyph glyph_notomono_64_0031 = {
|
||||
.glyph = 49,
|
||||
.left = 9,
|
||||
.top = 64,
|
||||
.advance = 53,
|
||||
.cols = 24,
|
||||
.rows = 64,
|
||||
.bitmap = bitmap_notomono_64_0031,
|
||||
.kerning = NULL,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '2'. */
|
||||
static const uint8_t bitmap_notomono_64_0032[] = {
|
||||
0x00, 0x03, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0xf8, 0x00, 0x00,
|
||||
0x03, 0xff, 0xff, 0xfe, 0x00, 0x00,
|
||||
0x0f, 0xff, 0xff, 0xff, 0x00, 0x00,
|
||||
0x1f, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x3f, 0xff, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xfc, 0x01, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xe0, 0x00, 0x7f, 0xe0, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x3f, 0xf0, 0x00,
|
||||
0x1f, 0x00, 0x00, 0x1f, 0xf0, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3f, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x80, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0xff, 0x00, 0x00,
|
||||
0x00, 0x00, 0x03, 0xfe, 0x00, 0x00,
|
||||
0x00, 0x00, 0x07, 0xfc, 0x00, 0x00,
|
||||
0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00,
|
||||
0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00,
|
||||
0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00,
|
||||
0x00, 0x00, 0xff, 0x80, 0x00, 0x00,
|
||||
0x00, 0x01, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0xfe, 0x00, 0x00, 0x00,
|
||||
0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00,
|
||||
0x00, 0x0f, 0xf8, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x3f, 0xe0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00,
|
||||
0x00, 0xff, 0x80, 0x00, 0x00, 0x00,
|
||||
0x01, 0xff, 0x00, 0x00, 0x00, 0x00,
|
||||
0x03, 0xfe, 0x00, 0x00, 0x00, 0x00,
|
||||
0x07, 0xfc, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0f, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0xe0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xfe, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xfe, 0x00,
|
||||
};
|
||||
|
||||
/** Glyph definition for character '2'. */
|
||||
static const struct glyph glyph_notomono_64_0032 = {
|
||||
.glyph = 50,
|
||||
.left = 7,
|
||||
.top = 65,
|
||||
.advance = 53,
|
||||
.cols = 39,
|
||||
.rows = 65,
|
||||
.bitmap = bitmap_notomono_64_0032,
|
||||
.kerning = NULL,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '3'. */
|
||||
static const uint8_t bitmap_notomono_64_0033[] = {
|
||||
0x00, 0x07, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xe0, 0x00, 0x00,
|
||||
0x01, 0xff, 0xff, 0xf8, 0x00, 0x00,
|
||||
0x07, 0xff, 0xff, 0xfe, 0x00, 0x00,
|
||||
0x1f, 0xff, 0xff, 0xff, 0x00, 0x00,
|
||||
0x3f, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x7f, 0xf8, 0x01, 0xff, 0xe0, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x7f, 0xe0, 0x00,
|
||||
0x3f, 0x00, 0x00, 0x3f, 0xf0, 0x00,
|
||||
0x1c, 0x00, 0x00, 0x1f, 0xf0, 0x00,
|
||||
0x08, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3f, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x80, 0x00,
|
||||
0x00, 0x00, 0x03, 0xff, 0x80, 0x00,
|
||||
0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xfc, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xf0, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xff, 0x80, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xfc, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xff, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x00, 0x00, 0x03, 0xff, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfe, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfe, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xfc, 0x00,
|
||||
0x80, 0x00, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0xe0, 0x00, 0x00, 0x1f, 0xf8, 0x00,
|
||||
0xf8, 0x00, 0x00, 0x7f, 0xf0, 0x00,
|
||||
0xff, 0x80, 0x01, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xc0, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00,
|
||||
0x3f, 0xff, 0xff, 0xf8, 0x00, 0x00,
|
||||
0x07, 0xff, 0xff, 0xe0, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Glyph definition for character '3'. */
|
||||
static const struct glyph glyph_notomono_64_0033 = {
|
||||
.glyph = 51,
|
||||
.left = 6,
|
||||
.top = 65,
|
||||
.advance = 53,
|
||||
.cols = 39,
|
||||
.rows = 66,
|
||||
.bitmap = bitmap_notomono_64_0033,
|
||||
.kerning = NULL,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '4'. */
|
||||
static const uint8_t bitmap_notomono_64_0034[] = {
|
||||
0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x01, 0xff, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x03, 0xf7, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x03, 0xf7, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x07, 0xf7, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x0f, 0xe7, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x0f, 0xe7, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x1f, 0xc7, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x3f, 0xc7, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x3f, 0x87, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x7f, 0x07, 0xf0, 0x00,
|
||||
0x00, 0x00, 0xff, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0xfe, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x01, 0xfc, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x03, 0xfc, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x03, 0xf8, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x07, 0xf0, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x0f, 0xf0, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x0f, 0xe0, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x1f, 0xe0, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x3f, 0x80, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x7f, 0x80, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0xff, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0xfe, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x01, 0xfe, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x03, 0xfc, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x03, 0xf8, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x07, 0xf8, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x0f, 0xf0, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x0f, 0xe0, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x7f, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xf8,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
};
|
||||
|
||||
/** Glyph definition for character '4'. */
|
||||
static const struct glyph glyph_notomono_64_0034 = {
|
||||
.glyph = 52,
|
||||
.left = 3,
|
||||
.top = 64,
|
||||
.advance = 53,
|
||||
.cols = 45,
|
||||
.rows = 64,
|
||||
.bitmap = bitmap_notomono_64_0034,
|
||||
.kerning = NULL,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '5'. */
|
||||
static const uint8_t bitmap_notomono_64_0035[] = {
|
||||
0x1f, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x1f, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x1f, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x1f, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x1f, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x1f, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x1f, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x1f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7f, 0x9f, 0xfe, 0x00, 0x00, 0x00,
|
||||
0x7f, 0xff, 0xff, 0xe0, 0x00, 0x00,
|
||||
0x7f, 0xff, 0xff, 0xf8, 0x00, 0x00,
|
||||
0x7f, 0xff, 0xff, 0xfc, 0x00, 0x00,
|
||||
0x7f, 0xff, 0xff, 0xff, 0x00, 0x00,
|
||||
0x7f, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x1f, 0xff, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x0e, 0x00, 0x07, 0xff, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x80, 0x00, 0x00, 0x1f, 0xf0, 0x00,
|
||||
0xc0, 0x00, 0x00, 0x3f, 0xe0, 0x00,
|
||||
0xf8, 0x00, 0x00, 0xff, 0xe0, 0x00,
|
||||
0xff, 0x00, 0x03, 0xff, 0xc0, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xfe, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xf8, 0x00, 0x00,
|
||||
0x3f, 0xff, 0xff, 0xf0, 0x00, 0x00,
|
||||
0x0f, 0xff, 0xff, 0x80, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Glyph definition for character '5'. */
|
||||
static const struct glyph glyph_notomono_64_0035 = {
|
||||
.glyph = 53,
|
||||
.left = 7,
|
||||
.top = 64,
|
||||
.advance = 53,
|
||||
.cols = 38,
|
||||
.rows = 65,
|
||||
.bitmap = bitmap_notomono_64_0035,
|
||||
.kerning = NULL,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '6'. */
|
||||
static const uint8_t bitmap_notomono_64_0036[] = {
|
||||
0x00, 0x00, 0x07, 0xff, 0x80, 0x00,
|
||||
0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00,
|
||||
0x00, 0x01, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x00, 0x07, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x00, 0x1f, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x00, 0x3f, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x00, 0xff, 0xf8, 0x00, 0x00, 0x00,
|
||||
0x01, 0xff, 0xe0, 0x00, 0x00, 0x00,
|
||||
0x01, 0xff, 0x80, 0x00, 0x00, 0x00,
|
||||
0x03, 0xff, 0x00, 0x00, 0x00, 0x00,
|
||||
0x07, 0xfc, 0x00, 0x00, 0x00, 0x00,
|
||||
0x07, 0xfc, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0f, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x7f, 0x80, 0x7f, 0xc0, 0x00, 0x00,
|
||||
0x7f, 0x81, 0xff, 0xf8, 0x00, 0x00,
|
||||
0x7f, 0x87, 0xff, 0xfe, 0x00, 0x00,
|
||||
0xff, 0x0f, 0xff, 0xff, 0x80, 0x00,
|
||||
0xff, 0x1f, 0xff, 0xff, 0xc0, 0x00,
|
||||
0xff, 0x3f, 0xff, 0xff, 0xe0, 0x00,
|
||||
0xff, 0x7f, 0xc1, 0xff, 0xe0, 0x00,
|
||||
0xff, 0xfe, 0x00, 0x3f, 0xf0, 0x00,
|
||||
0xff, 0xf8, 0x00, 0x1f, 0xf8, 0x00,
|
||||
0xff, 0xf0, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0xff, 0xe0, 0x00, 0x07, 0xfc, 0x00,
|
||||
0xff, 0xc0, 0x00, 0x03, 0xfc, 0x00,
|
||||
0xff, 0xc0, 0x00, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x80, 0x00, 0x01, 0xfc, 0x00,
|
||||
0xff, 0x80, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x7f, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x7f, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x7f, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x3f, 0x80, 0x00, 0x01, 0xfc, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x0f, 0xf0, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x0f, 0xf8, 0x00, 0x1f, 0xf0, 0x00,
|
||||
0x07, 0xfc, 0x00, 0x3f, 0xf0, 0x00,
|
||||
0x07, 0xff, 0x00, 0xff, 0xe0, 0x00,
|
||||
0x03, 0xff, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x01, 0xff, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x00, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xfe, 0x00, 0x00,
|
||||
0x00, 0x1f, 0xff, 0xfc, 0x00, 0x00,
|
||||
0x00, 0x07, 0xff, 0xf0, 0x00, 0x00,
|
||||
0x00, 0x00, 0xff, 0x80, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Glyph definition for character '6'. */
|
||||
static const struct glyph glyph_notomono_64_0036 = {
|
||||
.glyph = 54,
|
||||
.left = 7,
|
||||
.top = 65,
|
||||
.advance = 53,
|
||||
.cols = 39,
|
||||
.rows = 66,
|
||||
.bitmap = bitmap_notomono_64_0036,
|
||||
.kerning = NULL,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '7'. */
|
||||
static const uint8_t bitmap_notomono_64_0037[] = {
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0x80,
|
||||
0x00, 0x00, 0x00, 0x00, 0x7f, 0x80,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0x00, 0x00, 0x00, 0x01, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x7f, 0x80, 0x00,
|
||||
0x00, 0x00, 0x00, 0x7f, 0x80, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0xfe, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0xfe, 0x00, 0x00,
|
||||
0x00, 0x00, 0x03, 0xfc, 0x00, 0x00,
|
||||
0x00, 0x00, 0x03, 0xfc, 0x00, 0x00,
|
||||
0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
|
||||
0x00, 0x00, 0x07, 0xf8, 0x00, 0x00,
|
||||
0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00,
|
||||
0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7f, 0xc0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7f, 0x80, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7f, 0x80, 0x00, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x01, 0xfe, 0x00, 0x00, 0x00,
|
||||
0x00, 0x01, 0xfe, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0xfe, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0xfc, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0xfc, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0xf8, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0xf8, 0x00, 0x00, 0x00,
|
||||
0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1f, 0xe0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x3f, 0xe0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x3f, 0xc0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x7f, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00, 0xff, 0x80, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Glyph definition for character '7'. */
|
||||
static const struct glyph glyph_notomono_64_0037 = {
|
||||
.glyph = 55,
|
||||
.left = 6,
|
||||
.top = 64,
|
||||
.advance = 53,
|
||||
.cols = 41,
|
||||
.rows = 64,
|
||||
.bitmap = bitmap_notomono_64_0037,
|
||||
.kerning = NULL,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '8'. */
|
||||
static const uint8_t bitmap_notomono_64_0038[] = {
|
||||
0x00, 0x01, 0xff, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xfc, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0xfe, 0x00, 0x00,
|
||||
0x01, 0xff, 0xff, 0xff, 0x00, 0x00,
|
||||
0x07, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x07, 0xff, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x0f, 0xfe, 0x00, 0xff, 0xe0, 0x00,
|
||||
0x1f, 0xf8, 0x00, 0x3f, 0xf0, 0x00,
|
||||
0x1f, 0xf0, 0x00, 0x1f, 0xf0, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x07, 0xf0, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x1f, 0xe0, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x0f, 0xf0, 0x00, 0x1f, 0xe0, 0x00,
|
||||
0x0f, 0xf8, 0x00, 0x3f, 0xe0, 0x00,
|
||||
0x07, 0xfc, 0x00, 0x7f, 0xc0, 0x00,
|
||||
0x07, 0xfe, 0x00, 0xff, 0x80, 0x00,
|
||||
0x03, 0xff, 0x83, 0xff, 0x00, 0x00,
|
||||
0x01, 0xff, 0xef, 0xfe, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0xfc, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xf8, 0x00, 0x00,
|
||||
0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00,
|
||||
0x00, 0x0f, 0xff, 0xe0, 0x00, 0x00,
|
||||
0x00, 0x3f, 0xff, 0xf0, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0xfc, 0x00, 0x00,
|
||||
0x01, 0xff, 0xff, 0xfe, 0x00, 0x00,
|
||||
0x03, 0xff, 0x8f, 0xff, 0x00, 0x00,
|
||||
0x07, 0xfe, 0x03, 0xff, 0x80, 0x00,
|
||||
0x0f, 0xfc, 0x00, 0xff, 0xc0, 0x00,
|
||||
0x1f, 0xf0, 0x00, 0x7f, 0xe0, 0x00,
|
||||
0x3f, 0xe0, 0x00, 0x1f, 0xf0, 0x00,
|
||||
0x3f, 0xe0, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x7f, 0xc0, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x07, 0xfc, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfc, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x07, 0xfc, 0x00,
|
||||
0x7f, 0xc0, 0x00, 0x0f, 0xf8, 0x00,
|
||||
0x3f, 0xf0, 0x00, 0x1f, 0xf8, 0x00,
|
||||
0x1f, 0xfc, 0x00, 0x7f, 0xf0, 0x00,
|
||||
0x1f, 0xff, 0xff, 0xff, 0xe0, 0x00,
|
||||
0x0f, 0xff, 0xff, 0xff, 0xc0, 0x00,
|
||||
0x07, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x03, 0xff, 0xff, 0xff, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0xfc, 0x00, 0x00,
|
||||
0x00, 0x3f, 0xff, 0xf0, 0x00, 0x00,
|
||||
0x00, 0x03, 0xff, 0x80, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Glyph definition for character '8'. */
|
||||
static const struct glyph glyph_notomono_64_0038 = {
|
||||
.glyph = 56,
|
||||
.left = 7,
|
||||
.top = 65,
|
||||
.advance = 53,
|
||||
.cols = 39,
|
||||
.rows = 66,
|
||||
.bitmap = bitmap_notomono_64_0038,
|
||||
.kerning = NULL,
|
||||
};
|
||||
|
||||
/** Bitmap definition for character '9'. */
|
||||
static const uint8_t bitmap_notomono_64_0039[] = {
|
||||
0x00, 0x03, 0xfe, 0x00, 0x00, 0x00,
|
||||
0x00, 0x1f, 0xff, 0xc0, 0x00, 0x00,
|
||||
0x00, 0x7f, 0xff, 0xf0, 0x00, 0x00,
|
||||
0x00, 0xff, 0xff, 0xfc, 0x00, 0x00,
|
||||
0x03, 0xff, 0xff, 0xfe, 0x00, 0x00,
|
||||
0x07, 0xff, 0xff, 0xff, 0x00, 0x00,
|
||||
0x0f, 0xff, 0xff, 0xff, 0x80, 0x00,
|
||||
0x0f, 0xfe, 0x01, 0xff, 0xc0, 0x00,
|
||||
0x1f, 0xf8, 0x00, 0x7f, 0xc0, 0x00,
|
||||
0x1f, 0xf0, 0x00, 0x3f, 0xe0, 0x00,
|
||||
0x3f, 0xe0, 0x00, 0x1f, 0xe0, 0x00,
|
||||
0x3f, 0xc0, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x7f, 0x00, 0x00, 0x03, 0xf8, 0x00,
|
||||
0xff, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfc, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfc, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x01, 0xfe, 0x00,
|
||||
0xff, 0x00, 0x00, 0x03, 0xfe, 0x00,
|
||||
0x7f, 0x00, 0x00, 0x03, 0xfe, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x07, 0xfe, 0x00,
|
||||
0x7f, 0x80, 0x00, 0x07, 0xfe, 0x00,
|
||||
0x7f, 0xc0, 0x00, 0x0f, 0xfe, 0x00,
|
||||
0x3f, 0xe0, 0x00, 0x1f, 0xfe, 0x00,
|
||||
0x3f, 0xf0, 0x00, 0x3f, 0xfe, 0x00,
|
||||
0x1f, 0xf8, 0x00, 0xff, 0xfe, 0x00,
|
||||
0x0f, 0xff, 0x07, 0xfd, 0xfe, 0x00,
|
||||
0x0f, 0xff, 0xff, 0xf9, 0xfe, 0x00,
|
||||
0x07, 0xff, 0xff, 0xf1, 0xfe, 0x00,
|
||||
0x03, 0xff, 0xff, 0xe1, 0xfe, 0x00,
|
||||
0x00, 0xff, 0xff, 0xc3, 0xfc, 0x00,
|
||||
0x00, 0x3f, 0xff, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x07, 0xfc, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0xfc, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x07, 0xf8, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3f, 0xe0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00,
|
||||
0x00, 0x00, 0x00, 0x7f, 0xc0, 0x00,
|
||||
0x00, 0x00, 0x00, 0xff, 0x80, 0x00,
|
||||
0x00, 0x00, 0x01, 0xff, 0x00, 0x00,
|
||||
0x00, 0x00, 0x07, 0xff, 0x00, 0x00,
|
||||
0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00,
|
||||
0x07, 0x81, 0xff, 0xfc, 0x00, 0x00,
|
||||
0x07, 0xff, 0xff, 0xf8, 0x00, 0x00,
|
||||
0x07, 0xff, 0xff, 0xf0, 0x00, 0x00,
|
||||
0x07, 0xff, 0xff, 0xc0, 0x00, 0x00,
|
||||
0x07, 0xff, 0xff, 0x00, 0x00, 0x00,
|
||||
0x07, 0xff, 0xfc, 0x00, 0x00, 0x00,
|
||||
0x03, 0xff, 0xc0, 0x00, 0x00, 0x00,
|
||||
};
|
||||
|
||||
/** Glyph definition for character '9'. */
|
||||
static const struct glyph glyph_notomono_64_0039 = {
|
||||
.glyph = 57,
|
||||
.left = 7,
|
||||
.top = 65,
|
||||
.advance = 53,
|
||||
.cols = 39,
|
||||
.rows = 66,
|
||||
.bitmap = bitmap_notomono_64_0039,
|
||||
.kerning = NULL,
|
||||
};
|
||||
|
||||
/** Glyphs table for font "Noto Mono". */
|
||||
static const struct glyph *glyphs_notomono_64[] = {
|
||||
&glyph_notomono_64_0020, /* U+0020 ' ' */
|
||||
&glyph_notomono_64_0030, /* U+0030 '0' */
|
||||
&glyph_notomono_64_0031, /* U+0031 '1' */
|
||||
&glyph_notomono_64_0032, /* U+0032 '2' */
|
||||
&glyph_notomono_64_0033, /* U+0033 '3' */
|
||||
&glyph_notomono_64_0034, /* U+0034 '4' */
|
||||
&glyph_notomono_64_0035, /* U+0035 '5' */
|
||||
&glyph_notomono_64_0036, /* U+0036 '6' */
|
||||
&glyph_notomono_64_0037, /* U+0037 '7' */
|
||||
&glyph_notomono_64_0038, /* U+0038 '8' */
|
||||
&glyph_notomono_64_0039, /* U+0039 '9' */
|
||||
};
|
||||
|
||||
/** Definition for font "Noto Mono". */
|
||||
const struct font font_notomono_64 = {
|
||||
.name = "Noto Mono",
|
||||
.style = "Regular",
|
||||
.size = 64,
|
||||
.dpi = 100,
|
||||
.count = 11,
|
||||
.max = 57,
|
||||
.ascender = 83,
|
||||
.descender = -22,
|
||||
.height = 104,
|
||||
.glyphs = glyphs_notomono_64,
|
||||
.compressed = 0,
|
||||
};
|
||||
|
||||
15
lib/fonts/font-notomono-64.h
Normal file
15
lib/fonts/font-notomono-64.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/* AUTOMATICALLY GENERATED FILE! EDITING NOT RECOMMENDED!
|
||||
*
|
||||
* This file is distributed under the terms of the MIT License.
|
||||
* See the LICENSE file at the top of this tree, or if it is missing a copy can
|
||||
* be found at http://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#ifndef _FONTEM_notomono_64_H
|
||||
#define _FONTEM_notomono_64_H
|
||||
|
||||
#include "fontem.h"
|
||||
|
||||
extern const struct font font_notomono_64;
|
||||
|
||||
#endif /* _FONTEM_notomono_64_H */
|
||||
202
lib/fonts/open_sans/LICENSE.txt
Normal file
202
lib/fonts/open_sans/LICENSE.txt
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
BIN
lib/fonts/open_sans/OpenSans-Bold.ttf
Normal file
BIN
lib/fonts/open_sans/OpenSans-Bold.ttf
Normal file
Binary file not shown.
BIN
lib/fonts/open_sans/OpenSans-BoldItalic.ttf
Normal file
BIN
lib/fonts/open_sans/OpenSans-BoldItalic.ttf
Normal file
Binary file not shown.
BIN
lib/fonts/open_sans/OpenSans-ExtraBold.ttf
Normal file
BIN
lib/fonts/open_sans/OpenSans-ExtraBold.ttf
Normal file
Binary file not shown.
BIN
lib/fonts/open_sans/OpenSans-ExtraBoldItalic.ttf
Normal file
BIN
lib/fonts/open_sans/OpenSans-ExtraBoldItalic.ttf
Normal file
Binary file not shown.
BIN
lib/fonts/open_sans/OpenSans-Italic.ttf
Normal file
BIN
lib/fonts/open_sans/OpenSans-Italic.ttf
Normal file
Binary file not shown.
BIN
lib/fonts/open_sans/OpenSans-Light.ttf
Normal file
BIN
lib/fonts/open_sans/OpenSans-Light.ttf
Normal file
Binary file not shown.
BIN
lib/fonts/open_sans/OpenSans-LightItalic.ttf
Normal file
BIN
lib/fonts/open_sans/OpenSans-LightItalic.ttf
Normal file
Binary file not shown.
BIN
lib/fonts/open_sans/OpenSans-Regular.ttf
Normal file
BIN
lib/fonts/open_sans/OpenSans-Regular.ttf
Normal file
Binary file not shown.
BIN
lib/fonts/open_sans/OpenSans-SemiBold.ttf
Normal file
BIN
lib/fonts/open_sans/OpenSans-SemiBold.ttf
Normal file
Binary file not shown.
BIN
lib/fonts/open_sans/OpenSans-SemiBoldItalic.ttf
Normal file
BIN
lib/fonts/open_sans/OpenSans-SemiBoldItalic.ttf
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
2
macros.h
2
macros.h
@@ -40,7 +40,7 @@
|
||||
* For usage with STM32 libraries
|
||||
*/
|
||||
|
||||
#define STM32_FIELD(x, name) \
|
||||
#define STM32_GET_FIELD(x, name) \
|
||||
((x) & name##_Msk) >> (name##_Pos)
|
||||
|
||||
/*
|
||||
|
||||
140
main.cpp
Normal file
140
main.cpp
Normal file
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include "ConcreteTaskScheduler.h"
|
||||
#include "DisplayDriver.h"
|
||||
#include "SpiDriver.h"
|
||||
#include "BlinkTask.h"
|
||||
#include "LowPowerDelay.h"
|
||||
#include "DisplayTimeTask.h"
|
||||
|
||||
#include "stm32l0xx.h"
|
||||
|
||||
#include "macros.h"
|
||||
|
||||
using Common::Time;
|
||||
|
||||
static Common::Schedule::ConcreteTaskScheduler<10> g_sched;
|
||||
static BSP::SpiDriver g_spi(g_sched);
|
||||
static BSP::DisplayDriver g_display(g_sched, g_spi);
|
||||
//static BlinkTask g_blink(Common::Time::seconds(2));
|
||||
static DisplayTimeTask g_display_time(g_display);
|
||||
//static LowPowerDelay g_lp_delay;
|
||||
|
||||
extern "C" void __cxa_pure_virtual() { while(1) {} }
|
||||
|
||||
void SystemInit()
|
||||
{
|
||||
/**
|
||||
* Use the MSI for the system clock, and disable all other clocks.
|
||||
*/
|
||||
|
||||
/*!< Set MSION bit. Set by hardware to force the MSI oscillator ON
|
||||
* when exiting from Stop or Standby mode, or in case of a failure
|
||||
* of the HSE oscillator used directly or indirectly as system
|
||||
* clock. This bit cannot be cleared if the MSI is used as system
|
||||
* clock. */
|
||||
SET(RCC->CR,
|
||||
RCC_CR_MSION);
|
||||
|
||||
SET_TO(RCC->ICSCR,
|
||||
RCC_ICSCR_MSIRANGE,
|
||||
RCC_ICSCR_MSIRANGE_6);
|
||||
|
||||
/*!< Set internal representation of clock frequency to 4MHz */
|
||||
// system_clk_freq = 4u << 22;
|
||||
|
||||
/*!< Reset
|
||||
* SW[1:0] (use MSI oscillator as system clock),
|
||||
* HPRE[3:0] (do not divide AHB clock in prescaler) ,
|
||||
* PPRE1[2:0] (do not divide APB low-speed clock)
|
||||
* PPRE2[2:0] (do not divide APB high-speed clock),
|
||||
* MCOSEL[2:0] (disable MCO clock),
|
||||
* MCOPRE[2:0] (disable MCO prescaler) */
|
||||
CLR(RCC->CFGR,
|
||||
RCC_CFGR_SW | ~RCC_CFGR_HPRE | RCC_CFGR_PPRE1 | RCC_CFGR_PPRE2 |
|
||||
RCC_CFGR_MCOSEL | RCC_CFGR_MCOPRE);
|
||||
|
||||
/*!< Reset
|
||||
* HSION (disable HSI),
|
||||
* HSIDIVEN (disable 18MHz HSI division)
|
||||
* HSEON (disable HSE clock)
|
||||
* CSSHSEON (disable HSE clock monitoring)
|
||||
* PLLON (disable PLL)
|
||||
*/
|
||||
CLR(RCC->CR,
|
||||
RCC_CR_HSION | RCC_CR_HSIDIVEN | RCC_CR_HSEON |
|
||||
RCC_CR_CSSHSEON | RCC_CR_PLLON);
|
||||
|
||||
/*!< Reset HSEBYP bit (disable HSE bypass) */
|
||||
CLR(RCC->CR,
|
||||
RCC_CR_HSEBYP);
|
||||
|
||||
/*!< Reset
|
||||
* PLLSRC (HSI16 is the PLL source),
|
||||
* PLLMUL[3:0] (3x PLL multiplication)
|
||||
* Don't touch PLLDIV[1:0], since 0 is undefined
|
||||
*/
|
||||
CLR(RCC->CFGR,
|
||||
RCC_CFGR_PLLSRC | RCC_CFGR_PLLMUL | RCC_CFGR_PLLDIV);
|
||||
|
||||
|
||||
/*!< Disable all interrupts */
|
||||
RCC->CIER = 0x00000000;
|
||||
|
||||
/* Vector Table Relocation in Internal FLASH */
|
||||
SCB->VTOR = FLASH_BASE;
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
typedef void (*func_ptr)(void);
|
||||
extern func_ptr __init_array_start[], __init_array_end[];
|
||||
|
||||
static void _init(void)
|
||||
{
|
||||
|
||||
for (func_ptr* func = __init_array_start; func != __init_array_end; func++) {
|
||||
(*func)();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[[noreturn]] void main() {
|
||||
|
||||
_init();
|
||||
|
||||
BSP::SystemTimer::init(RTC);
|
||||
g_spi.init();
|
||||
g_display.init();
|
||||
//g_blink.init();
|
||||
g_display_time.init();
|
||||
|
||||
Common::Schedule::NextTime asap = Common::Schedule::NextTime::asap();
|
||||
//g_sched.add_task(g_blink, asap);
|
||||
//g_sched.add_task(g_lp_delay, asap);
|
||||
g_sched.add_task(g_spi, asap);
|
||||
g_sched.add_task(g_display, asap);
|
||||
g_sched.add_task(g_display_time, asap);
|
||||
|
||||
g_sched.run();
|
||||
}
|
||||
47
rtc.c
47
rtc.c
@@ -36,18 +36,34 @@ static void disable_rtc_write()
|
||||
RTC->WPR = 0x00;
|
||||
}
|
||||
|
||||
uint32_t bin_to_bcd(uint32_t bin)
|
||||
{
|
||||
uint32_t bcd = 0;
|
||||
while (bin > 0) {
|
||||
bcd <<= 4;
|
||||
bcd |= bin % 10;
|
||||
bin /= 10;
|
||||
}
|
||||
|
||||
return bcd;
|
||||
}
|
||||
|
||||
void rtc_init()
|
||||
{
|
||||
uint32_t temp = RCC->CSR;
|
||||
|
||||
SET(RCC->CSR, RCC_CSR_RTCRST);
|
||||
SET(RCC->APB1ENR, RCC_APB1ENR_PWREN);
|
||||
SET(PWR->CR, PWR_CR_DBP);
|
||||
|
||||
/*<! Set RTC input clock to the LSI (low-speed internal 32.768kHz) clock */
|
||||
SET_TO(temp, RCC_CSR_RTCSEL, RCC_CSR_RTCSEL_1);
|
||||
SET(temp, RCC_CSR_LSEON);
|
||||
SET_TO(temp, RCC_CSR_RTCSEL, RCC_CSR_RTCSEL_0);
|
||||
SET(temp, RCC_CSR_RTCEN);
|
||||
RCC->CSR = temp;
|
||||
|
||||
while (!(RCC->CSR & RCC_CSR_LSERDY)) {}
|
||||
|
||||
enable_rtc_write();
|
||||
|
||||
RTC->ISR = RTC_ISR_INIT;
|
||||
@@ -59,6 +75,7 @@ void rtc_init()
|
||||
/*<! Set the Syncronous scaler (divide the clock by 255 + 1) */
|
||||
SET_TO(RTC->PRER, RTC_PRER_PREDIV_S, 255);
|
||||
|
||||
|
||||
/*<! Load initial date and time */
|
||||
// TODO
|
||||
/* uint32_t time = 0; */
|
||||
@@ -66,6 +83,20 @@ void rtc_init()
|
||||
/*<! Set the date and time format */
|
||||
// TODO: currently defaults to 24hr
|
||||
|
||||
// 12-Hour format
|
||||
SET(RTC->CR, RTC_CR_FMT);
|
||||
|
||||
uint32_t time = 0;
|
||||
SET(time, RTC_TR_PM);
|
||||
SET_TO(time, RTC_TR_HT, 1 << RTC_TR_HT_Pos);
|
||||
SET_TO(time, RTC_TR_HU, 2 << RTC_TR_HU_Pos);
|
||||
SET_TO(time, RTC_TR_MNT, 5 << RTC_TR_MNT_Pos);
|
||||
SET_TO(time, RTC_TR_MNU, 9 << RTC_TR_MNU_Pos);
|
||||
SET_TO(time, RTC_TR_ST, 0 << RTC_TR_ST_Pos);
|
||||
SET_TO(time, RTC_TR_SU, 0 << RTC_TR_SU_Pos);
|
||||
RTC->TR = time;
|
||||
|
||||
|
||||
CLR(RTC->ISR, RTC_ISR_INIT);
|
||||
|
||||
disable_rtc_write();
|
||||
@@ -76,14 +107,14 @@ void rtc_get_time_bcd(struct time_bcd *tm_bcd)
|
||||
{
|
||||
uint32_t time = RTC->TR;
|
||||
|
||||
tm_bcd->hour_tens = STM32_FIELD(time, RTC_TR_HT);
|
||||
tm_bcd->hour_ones = STM32_FIELD(time, RTC_TR_HU);
|
||||
tm_bcd->hour_tens = STM32_GET_FIELD(time, RTC_TR_HT);
|
||||
tm_bcd->hour_ones = STM32_GET_FIELD(time, RTC_TR_HU);
|
||||
|
||||
tm_bcd->minute_tens = STM32_FIELD(time, RTC_TR_MNT);
|
||||
tm_bcd->minute_ones = STM32_FIELD(time, RTC_TR_MNU);
|
||||
tm_bcd->minute_tens = STM32_GET_FIELD(time, RTC_TR_MNT);
|
||||
tm_bcd->minute_ones = STM32_GET_FIELD(time, RTC_TR_MNU);
|
||||
|
||||
tm_bcd->second_tens = STM32_FIELD(time, RTC_TR_ST);
|
||||
tm_bcd->second_ones = STM32_FIELD(time, RTC_TR_SU);
|
||||
tm_bcd->second_tens = STM32_GET_FIELD(time, RTC_TR_ST);
|
||||
tm_bcd->second_ones = STM32_GET_FIELD(time, RTC_TR_SU);
|
||||
|
||||
tm_bcd->pm = STM32_FIELD(time, RTC_TR_PM);
|
||||
tm_bcd->pm = STM32_GET_FIELD(time, RTC_TR_PM);
|
||||
}
|
||||
|
||||
104
stm32l031k6.S
104
stm32l031k6.S
@@ -90,39 +90,40 @@ __Vectors:
|
||||
.long SysTick_Handler /* SysTick Handler */
|
||||
|
||||
/* External interrupts */
|
||||
.long WDT_IRQHandler /* 0: Watchdog Timer */
|
||||
.long RTC_IRQHandler /* 1: Real Time Clock */
|
||||
.long TIM0_IRQHandler /* 2: Timer0 / Timer1 */
|
||||
.long TIM2_IRQHandler /* 3: Timer2 / Timer3 */
|
||||
.long MCIA_IRQHandler /* 4: MCIa */
|
||||
.long MCIB_IRQHandler /* 5: MCIb */
|
||||
.long UART0_IRQHandler /* 6: UART0 - DUT FPGA */
|
||||
.long UART1_IRQHandler /* 7: UART1 - DUT FPGA */
|
||||
.long UART2_IRQHandler /* 8: UART2 - DUT FPGA */
|
||||
.long UART4_IRQHandler /* 9: UART4 - not connected */
|
||||
.long AACI_IRQHandler /* 10: AACI / AC97 */
|
||||
.long CLCD_IRQHandler /* 11: CLCD Combined Interrupt */
|
||||
.long ENET_IRQHandler /* 12: Ethernet */
|
||||
.long USBDC_IRQHandler /* 13: USB Device */
|
||||
.long USBHC_IRQHandler /* 14: USB Host Controller */
|
||||
.long CHLCD_IRQHandler /* 15: Character LCD */
|
||||
.long FLEXRAY_IRQHandler /* 16: Flexray */
|
||||
.long CAN_IRQHandler /* 17: CAN */
|
||||
.long LIN_IRQHandler /* 18: LIN */
|
||||
.long I2C_IRQHandler /* 19: I2C ADC/DAC */
|
||||
.long 0 /* 20: Reserved */
|
||||
.long 0 /* 21: Reserved */
|
||||
.long 0 /* 22: Reserved */
|
||||
.long 0 /* 23: Reserved */
|
||||
.long 0 /* 24: Reserved */
|
||||
.long 0 /* 25: Reserved */
|
||||
.long 0 /* 26: Reserved */
|
||||
.long 0 /* 27: Reserved */
|
||||
.long CPU_CLCD_IRQHandler /* 28: Reserved - CPU FPGA CLCD */
|
||||
.long 0 /* 29: Reserved - CPU FPGA */
|
||||
.long UART3_IRQHandler /* 30: UART3 - CPU FPGA */
|
||||
.long SPI_IRQHandler /* 31: SPI Touchscreen - CPU FPGA */
|
||||
.long WWDG_IRQHandler /* 0: Watchdog Timer */
|
||||
.long PVD_IRQHandler /* 1: Real Time Clock */
|
||||
.long RTC_IRQHandler /* 2: Timer0 / Timer1 */
|
||||
.long FLASH_IRQHandler /* 3: Timer2 / Timer3 */
|
||||
.long RCC_CRS_IRQHandler /* 4: MCIa */
|
||||
.long EXTI_1_0_IRQHandler /* 5: MCIb */
|
||||
.long EXTI_3_2_IRQHandler /* 6: UART0 - DUT FPGA */
|
||||
.long EXTI_15_4_IRQHandler /* 7: UART1 - DUT FPGA */
|
||||
.long 0 /* 8: UART2 - reserved */
|
||||
.long DMA1_CHANNEL1_IRQHandler /* 8: UART2 - DUT FPGA */
|
||||
.long DMA1_CHANNEL3_2_IRQHandler /* 9: UART4 - not connected */
|
||||
.long DMA_CHANNEL_7_4_IRQHandler /* 10: AACI / AC97 */
|
||||
.long ADC_COMP_IRQHandler /* 11: CLCD Combined Interrupt */
|
||||
.long LPTIM1_IRQHandler /* 12: Ethernet */
|
||||
.long USART4_USART5_IRQHandler /* 13: USB Device */
|
||||
.long TIM2_IRQHandler /* 14: USB Host Controller */
|
||||
.long TIM3_IRQHandler /* 15: Character LCD */
|
||||
.long TIM6_IRQHandler /* 16: Flexray */
|
||||
.long TIM7_IRQHandler /* 17: CAN */
|
||||
.long 0 /* 18: LIN */
|
||||
.long TIM21_IRQHandler /* 19: I2C ADC/DAC */
|
||||
.long I2C3_IRQHandler /* 20: Reserved */
|
||||
.long TIM22_IRQHandler /* 21: Reserved */
|
||||
|
||||
/* TODO: There are more but I'm lazy */
|
||||
.long 0
|
||||
.long 0
|
||||
.long 0
|
||||
.long 0
|
||||
.long 0
|
||||
.long 0
|
||||
.long 0
|
||||
.long 0
|
||||
.long 0
|
||||
.size __Vectors, . - __Vectors
|
||||
|
||||
.text
|
||||
@@ -293,28 +294,27 @@ Default_Handler:
|
||||
def_irq_handler PendSV_Handler
|
||||
def_irq_handler SysTick_Handler
|
||||
|
||||
def_irq_handler WWDG_IRQHandler
|
||||
def_irq_handler PVD_IRQHandler
|
||||
def_irq_handler WDT_IRQHandler
|
||||
def_irq_handler RTC_IRQHandler
|
||||
def_irq_handler TIM0_IRQHandler
|
||||
def_irq_handler FLASH_IRQHandler
|
||||
def_irq_handler RCC_CRS_IRQHandler
|
||||
def_irq_handler EXTI_1_0_IRQHandler
|
||||
def_irq_handler EXTI_3_2_IRQHandler
|
||||
def_irq_handler EXTI_15_4_IRQHandler
|
||||
def_irq_handler DMA1_CHANNEL1_IRQHandler
|
||||
def_irq_handler DMA1_CHANNEL3_2_IRQHandler
|
||||
def_irq_handler DMA_CHANNEL_7_4_IRQHandler
|
||||
def_irq_handler ADC_COMP_IRQHandler
|
||||
def_irq_handler LPTIM1_IRQHandler
|
||||
def_irq_handler USART4_USART5_IRQHandler
|
||||
def_irq_handler TIM2_IRQHandler
|
||||
def_irq_handler MCIA_IRQHandler
|
||||
def_irq_handler MCIB_IRQHandler
|
||||
def_irq_handler UART0_IRQHandler
|
||||
def_irq_handler UART1_IRQHandler
|
||||
def_irq_handler UART2_IRQHandler
|
||||
def_irq_handler UART3_IRQHandler
|
||||
def_irq_handler UART4_IRQHandler
|
||||
def_irq_handler AACI_IRQHandler
|
||||
def_irq_handler CLCD_IRQHandler
|
||||
def_irq_handler ENET_IRQHandler
|
||||
def_irq_handler USBDC_IRQHandler
|
||||
def_irq_handler USBHC_IRQHandler
|
||||
def_irq_handler CHLCD_IRQHandler
|
||||
def_irq_handler FLEXRAY_IRQHandler
|
||||
def_irq_handler CAN_IRQHandler
|
||||
def_irq_handler LIN_IRQHandler
|
||||
def_irq_handler I2C_IRQHandler
|
||||
def_irq_handler CPU_CLCD_IRQHandler
|
||||
def_irq_handler SPI_IRQHandler
|
||||
def_irq_handler TIM3_IRQHandler
|
||||
def_irq_handler TIM6_IRQHandler
|
||||
def_irq_handler TIM7_IRQHandler
|
||||
def_irq_handler TIM21_IRQHandler
|
||||
def_irq_handler I2C3_IRQHandler
|
||||
def_irq_handler TIM22_IRQHandler
|
||||
|
||||
.end
|
||||
|
||||
2
system.h
2
system.h
@@ -19,11 +19,13 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _SYSTEM_H_
|
||||
#define _SYSTEM_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
uint32_t system_get_clk_freq(void);
|
||||
uint64_t system_get_time_micros(void);
|
||||
|
||||
#endif
|
||||
|
||||
234
test.c
234
test.c
@@ -1,234 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Max Regan
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "stm32l0xx.h"
|
||||
|
||||
#include "macros.h"
|
||||
#include "rtc.h"
|
||||
#include "spi.h"
|
||||
#include "display.h"
|
||||
#include "font-notomono-10.h"
|
||||
|
||||
/* TODO: Start cleaning up code and adding bounds checking! */
|
||||
extern uint32_t system_clk_freq;
|
||||
|
||||
void SystemInit()
|
||||
{
|
||||
/**
|
||||
* Use the MSI for the system clock, and disable all other clocks.
|
||||
*/
|
||||
|
||||
/*!< Set MSION bit. Set by hardware to force the MSI oscillator ON
|
||||
* when exiting from Stop or Standby mode, or in case of a failure
|
||||
* of the HSE oscillator used directly or indirectly as system
|
||||
* clock. This bit cannot be cleared if the MSI is used as system
|
||||
* clock. */
|
||||
SET(RCC->CR,
|
||||
RCC_CR_MSION);
|
||||
|
||||
SET_TO(RCC->ICSCR,
|
||||
RCC_ICSCR_MSIRANGE,
|
||||
RCC_ICSCR_MSIRANGE_6);
|
||||
|
||||
/*!< Set internal representation of clock frequency to 4MHz */
|
||||
system_clk_freq = 4u << 22;
|
||||
|
||||
/*!< Reset
|
||||
* SW[1:0] (use MSI oscillator as system clock),
|
||||
* HPRE[3:0] (do not divide AHB clock in prescaler) ,
|
||||
* PPRE1[2:0] (do not divide APB low-speed clock)
|
||||
* PPRE2[2:0] (do not divide APB high-speed clock),
|
||||
* MCOSEL[2:0] (disable MCO clock),
|
||||
* MCOPRE[2:0] (disable MCO prescaler) */
|
||||
CLR(RCC->CFGR,
|
||||
RCC_CFGR_SW | ~RCC_CFGR_HPRE | RCC_CFGR_PPRE1 | RCC_CFGR_PPRE2 |
|
||||
RCC_CFGR_MCOSEL | RCC_CFGR_MCOPRE);
|
||||
|
||||
/*!< Reset
|
||||
* HSION (disable HSI),
|
||||
* HSIDIVEN (disable 18MHz HSI division)
|
||||
* HSEON (disable HSE clock)
|
||||
* CSSHSEON (disable HSE clock monitoring)
|
||||
* PLLON (disable PLL)
|
||||
*/
|
||||
CLR(RCC->CR,
|
||||
RCC_CR_HSION | RCC_CR_HSIDIVEN | RCC_CR_HSEON |
|
||||
RCC_CR_CSSHSEON | RCC_CR_PLLON);
|
||||
|
||||
/*!< Reset HSEBYP bit (disable HSE bypass) */
|
||||
CLR(RCC->CR,
|
||||
RCC_CR_HSEBYP);
|
||||
|
||||
/*!< Reset
|
||||
* PLLSRC (HSI16 is the PLL source),
|
||||
* PLLMUL[3:0] (3x PLL multiplication)
|
||||
* Don't touch PLLDIV[1:0], since 0 is undefined
|
||||
*/
|
||||
CLR(RCC->CFGR,
|
||||
RCC_CFGR_PLLSRC | RCC_CFGR_PLLMUL | RCC_CFGR_PLLDIV);
|
||||
|
||||
|
||||
/*!< Disable all interrupts */
|
||||
RCC->CIER = 0x00000000;
|
||||
|
||||
/* Vector Table Relocation in Internal FLASH */
|
||||
SCB->VTOR = FLASH_BASE;
|
||||
}
|
||||
|
||||
void init_lptim()
|
||||
{
|
||||
/* Enable APB1 for LPTIM */
|
||||
SET(RCC->APB1ENR,
|
||||
RCC_APB1ENR_LPTIM1EN);
|
||||
|
||||
// Enable low-speed internal
|
||||
RCC->CSR |= RCC_CSR_LSION;
|
||||
while (!(RCC->CSR & RCC_CSR_LSIRDY)) {};
|
||||
|
||||
/*!< Set the LSI clock to be the source of the LPTIM */
|
||||
SET_TO(RCC->CCIPR,
|
||||
RCC_CCIPR_LPTIM1SEL,
|
||||
RCC_CCIPR_LPTIM1SEL_0);
|
||||
|
||||
/** Write CR CFGR and IER while LPTIM is disabled (LPTIM_CR_ENABLE not yet set) */
|
||||
|
||||
/*!< Disable Interrupts (not needed, this is the default */
|
||||
LPTIM1->IER = 0;
|
||||
|
||||
/*!< Reset
|
||||
* ENC (Disable encoder mode)
|
||||
* TIMOUT (disable timeout mode)
|
||||
* TRIGEN (Trigger count start with software only)
|
||||
* PRELOAD (Update ARR and CMP registers immediately after write)
|
||||
* CKSEL (LPTIM is using internal clock source)
|
||||
* COUNTMODE (LPTIM counter updated on every clock pulse)
|
||||
* TRGFLT (Do not debounce triggers)
|
||||
*/
|
||||
CLR(LPTIM1->CFGR,
|
||||
LPTIM_CFGR_ENC | LPTIM_CFGR_TIMOUT | LPTIM_CFGR_TRIGEN |
|
||||
LPTIM_CFGR_TRIGSEL | LPTIM_CFGR_PRELOAD | LPTIM_CFGR_CKSEL |
|
||||
LPTIM_CFGR_COUNTMODE);
|
||||
|
||||
/*!< Set
|
||||
* PRESC (Set prescaler to 128. Using 32kHz LSI as input, this should
|
||||
* correspond to 250Hz counting.
|
||||
*/
|
||||
SET_TO(LPTIM1->CFGR,
|
||||
LPTIM_CFGR_PRESC,
|
||||
7u << LPTIM_CFGR_PRESC_Pos);
|
||||
|
||||
SET(LPTIM1->CR, LPTIM_CR_ENABLE);
|
||||
|
||||
/*!< Do not modify ARR and CMP until after ENABLE bit is set */
|
||||
/*!< Produce a 60Hz, 50% duty cycle square wave. These values were
|
||||
* determined experimentally. */
|
||||
LPTIM1->ARR = 9;
|
||||
LPTIM1->CMP = 4;
|
||||
while(!(LPTIM1->ISR & LPTIM_ISR_ARROK)) {}
|
||||
while(!(LPTIM1->ISR & LPTIM_ISR_CMPOK)) {}
|
||||
|
||||
/*!< Enable and start the timer */
|
||||
SET(LPTIM1->CR, LPTIM_CR_CNTSTRT);
|
||||
}
|
||||
|
||||
static struct display display;
|
||||
|
||||
void init_lptim_toggler()
|
||||
{
|
||||
init_lptim();
|
||||
|
||||
/* Assign LPTIM1_OUT to PA7 */
|
||||
SET_TO(GPIOA->AFR[0],
|
||||
GPIO_AFRL_AFRL7,
|
||||
1u << GPIO_AFRL_AFRL7_Pos);
|
||||
|
||||
SET_TO(GPIOA->MODER,
|
||||
GPIO_MODER_MODE7,
|
||||
2u << GPIO_MODER_MODE7_Pos);
|
||||
|
||||
CLR(GPIOA->OTYPER, GPIO_OTYPER_OT_7);
|
||||
CLR(GPIOA->PUPDR, GPIO_PUPDR_PUPD7);
|
||||
}
|
||||
|
||||
static char get_char_for_digit(uint8_t bcd_digit)
|
||||
{
|
||||
return bcd_digit + '0';
|
||||
}
|
||||
|
||||
struct time_bcd time;
|
||||
char time_str[11] = { 0 };
|
||||
|
||||
int main()
|
||||
{
|
||||
/** Enable Port A,B clock */
|
||||
SET(RCC->IOPENR, RCC_IOPENR_IOPAEN);
|
||||
SET(RCC->IOPENR, RCC_IOPENR_IOPBEN);
|
||||
|
||||
/** Enable pin P3 for output */
|
||||
SET_TO(GPIOB->MODER,
|
||||
GPIO_MODER_MODE3,
|
||||
GPIO_MODER_MODE3_0);
|
||||
|
||||
CLR(GPIOB->OTYPER, GPIO_OTYPER_OT_3);
|
||||
CLR(GPIOB->PUPDR, GPIO_PUPDR_PUPD3);
|
||||
|
||||
init_lptim_toggler();
|
||||
|
||||
display_init(&display, SPI1);
|
||||
rtc_init();
|
||||
|
||||
int x = 0;
|
||||
while (1) {
|
||||
|
||||
rtc_get_time_bcd(&time);
|
||||
|
||||
time_str[0] = get_char_for_digit(time.hour_tens);
|
||||
time_str[1] = get_char_for_digit(time.hour_ones);
|
||||
time_str[2] = ':';
|
||||
|
||||
time_str[3] = get_char_for_digit(time.minute_tens);
|
||||
time_str[4] = get_char_for_digit(time.minute_ones);
|
||||
time_str[5] = ':';
|
||||
|
||||
time_str[6] = get_char_for_digit(time.second_tens);
|
||||
time_str[7] = get_char_for_digit(time.second_ones);
|
||||
time_str[8] = time.pm ? 'P' : 'A';
|
||||
time_str[9] = 'M';
|
||||
time_str[10] = '\0';
|
||||
|
||||
FLIP(GPIOB->ODR, GPIO_ODR_OD3);
|
||||
// for (int i = 0; i < 10000; i++);
|
||||
display_clear(&display);
|
||||
display_string_at(&display, 32, font_notomono_10.height * 0, time_str, &font_notomono_10);
|
||||
display_string_at(&display, 0, font_notomono_10.height * 2, "> Option 1", &font_notomono_10);
|
||||
display_string_at(&display, 0, font_notomono_10.height * 3, " Option 2", &font_notomono_10);
|
||||
display_string_at(&display, 0, font_notomono_10.height * 4, " Option 3", &font_notomono_10);
|
||||
display_refresh(&display);
|
||||
x++;
|
||||
if (x == DISPLAY_WIDTH) {
|
||||
x = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user