This file contains 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
module multiple; | |
logic a; | |
initial a = 1; | |
// The assigned value of the variable is determinate | |
initial begin | |
a <= #4 0; // schedules a = 0 at time 4 | |
a <= #4 1; // schedules a = 1 at time 4 | |
end // At time 4, a = 1 | |
endmodule |
This file contains 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
#include "SAMD51_TC.h" | |
bool isLEDOn = false; | |
char time = 0; | |
void setup() | |
{ | |
//SerialUSB.begin(115200); | |
//while(!SerialUSB); | |
This file contains 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
//#include "SAMD51_TC.h" | |
#include <samd.h> | |
#include <cstdint> | |
#include <array> | |
#define GENERIC_CLOCK_GENERATOR_1M 5u | |
class SAMD51TCInterruptHelper; |
This file contains 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
#include <wiring_private.h> | |
static Uart Serial3(&sercom3, PIN_WIRE_SCL, PIN_WIRE_SDA, SERCOM_RX_PAD_1, UART_TX_PAD_0); | |
void setup() { | |
Serial.begin(115200); | |
while(!Serial); | |
Serial3.begin(115200); | |
pinPeripheral(PIN_WIRE_SCL, PIO_SERCOM_ALT); |
This file contains 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
#include <TFT_eSPI.h> | |
#include <cstdint> | |
unsigned char boot_bin[] = { | |
0x00, 0x00, 0x03, 0x20, 0x09, 0x00, 0x00, 0x04, 0x80, 0xb5, 0x00, 0xaf, | |
0x88, 0xb0, 0x00, 0xf0, 0x4d, 0xf8, 0x07, 0x90, 0x07, 0x98, 0x01, 0x21, | |
0xca, 0x03, 0x82, 0x60, 0x03, 0x91, 0x00, 0xf0, 0x4d, 0xf8, 0x06, 0x90, | |
0x06, 0x98, 0x03, 0x99, 0xca, 0x02, 0x82, 0x60, 0x06, 0x98, 0x82, 0x61, | |
0xff, 0xe7, 0x07, 0x98, 0x01, 0x21, 0xca, 0x03, 0xc2, 0x61, 0x05, 0x91, | |
0xff, 0xe7, 0x05, 0x98, 0x15, 0x49, 0x88, 0x42, 0x18, 0xd8, 0xff, 0xe7, | |
0x06, 0x98, 0x01, 0x21, 0xc9, 0x02, 0xc1, 0x61, 0x00, 0x20, 0x04, 0x90, |
This file contains 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
{ | |
"configurations": [ | |
{ | |
"name": "Linux", | |
"includePath": [ | |
"${workspaceFolder}/**", | |
"${env:HONE}/.arduino15/packages/Seeeduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include", | |
"${env:HOME}/.arduino15/packages/Seeeduino/tools/CMSIS/**", | |
"${env:HOME}/.arduino15/packages/Seeeduino/tools/CMSIS-Atmel/**", | |
"${env:HOME}/.arduino15/packages/Seeeduino/hardware/samd/1.7.5/**", |
This file contains 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 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 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 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); | |
//... |