This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: all | |
XTENSA_PREFIX ?= xtensa-esp32-elf- | |
XTENSA_BIN ?= $(HOME)/xtensa-esp32-elf/1.22.0-80/bin | |
CC := $(XTENSA_BIN)/$(XTENSA_PREFIX)gcc | |
CXX := $(XTENSA_BIN)/$(XTENSA_PREFIX)g++ | |
CC := $(XTENSA_BIN)/$(XTENSA_PREFIX)ld | |
OBJDUMP := $(XTENSA_BIN)/$(XTENSA_PREFIX)objdump | |
CXXFLAGS := -g -Os -std=c++11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import machine | |
import time | |
class GowinConfig(object): | |
def __init__(self, pin_cs:machine.Pin, pin_mode0:machine.Pin, pin_reconfig_n:machine.Pin, pin_ready:machine.Pin, spi:machine.SPI): | |
self.__pin_cs = pin_cs | |
self.__pin_mode0 = pin_mode0 | |
self.__pin_reconfig_n = pin_reconfig_n | |
self.__pin_ready = pin_ready |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
input_path = sys.argv[1] | |
output_path = sys.argv[2] | |
with open(input_path, 'r') as input_file: | |
with open(output_path, 'wb') as output_file: | |
for line in iter(input_file.readline, ''): #type: str |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct JpegDecodeBuffer | |
{ | |
std::uint8_t body[4096]; | |
}; | |
bool draw_jpg(DataWrapper* data, int16_t x, int16_t y, int16_t maxWidth, int16_t maxHeight, int16_t offX, int16_t offY, jpeg_div_t scale, JpegDecodeBuffer& decodeBuffer) | |
{ | |
//... | |
auto jres = jd_prepare(&jpegdec, jpg_read_data, decodeBuffer.body, sz_pool, &jpeg); | |
//... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef FIXEDPOINT_HPP_ | |
#define FIXEDPOINT_HPP_ | |
#include <stdint.h> | |
template<typename TBaseIntegral, std::size_t TFractionBits> | |
class fixedpoint | |
{ | |
private: | |
TBaseIntegral value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Runtime.InteropServices; | |
using System.Linq; | |
class SerialPort : IDisposable | |
{ | |
[DllImport("libc.so.6", EntryPoint="open")] | |
private static extern int Open(string path, int mode); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rebooting... | |
ets Jun 8 2016 00:22:57 | |
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) | |
configsip: 188777542, SPIWP:0xee | |
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 | |
mode:DIO, clock div:1 | |
load:0x3fff0018,len:4 | |
load:0x3fff001c,len:1044 | |
load:0x40078000,len:8896 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AXPCompat(object): | |
def __init__(self): | |
if( hasattr(axp, 'setLDO2Vol') ): | |
self.setLDO2Vol = axp.setLDO2Vol | |
else: | |
self.setLDO2Vol = axp.setLDO2Volt | |
axp = AXPCompat() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Block __WiSUN_start | |
var __WiSUN_start_json = { | |
"previousStatement": null, | |
"nextStatement": null, | |
"message0": "%1", | |
"args0": [ | |
{ | |
"type": "field_label", | |
"text": "start" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef IMU_HPP__ | |
#define IMU_HPP__ | |
#include <cstdint> | |
#include <freertos/FreeRTOS.h> | |
#include <freertos/task.h> | |
#include <freertos/semphr.h> | |
#include <esp_err.h> | |
#include <esp_timer.h> |