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
#if !defined(ARDUINO) | |
#include <M5Unified.h> | |
enum pin_mode_t | |
{ | |
output, | |
input, | |
input_pullup, | |
input_pulldown |
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
#include <Wire.h> | |
class I2C_SLG46826 { | |
public: | |
I2C_SLG46826(TwoWire &i2cWire = Wire) { | |
_i2cWire = &i2cWire; | |
} | |
bool scanSlg(uint8_t controlCode) { | |
if (16 <= controlCode) { |
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
// base https://github.com/lovyan03/M5Stack_LovyanLauncher/blob/master/LovyanLauncher/src/CBFSBench.h | |
#include <SPIFFS.h> | |
#include <FFat.h> | |
#include <LittleFS.h> | |
#define BENCH_FS 2 // 0=SPIFFS, 1=LittleFS, 2=FFat | |
String tmpFile{"/lovyanLauncherBench"}; | |
#if BENCH_FS == 0 |
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
// https://github.com/eembc/coremark | |
#include "core_portme.h" | |
int main(void); | |
void setup() | |
{ | |
Serial.begin(115200); | |
delay(500); | |
disableCore0WDT(); |
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
#!/bin/bash | |
CHIP_NAME=$1 | |
COM_NAME=$2 | |
COM_SPEED=$3 | |
ELF_FILE=$4 | |
PROJECT_NAME=`basename $ELF_FILE` | |
BUILD_PATH=`dirname $ELF_FILE` | |
if [ `basename $BUILD_PATH` = "examples" ]; then |
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
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-Wl,--Map={build.path}/{build.project_name}.map" "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} {build.extra_flags} -Wl,--start-group {object_files} "{archive_file_path}" {compiler.c.elf.libs} {compiler.libraries.ldflags} -Wl,--end-group -Wl,-EL -o "{build.path}/{build.project_name}.elf" |
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
#define LGFX_AUTODETECT | |
#include <LovyanGFX.hpp> | |
#include "I2C_BM8563.h" | |
LGFX lcd; | |
I2C_BM8563 rtc(I2C_BM8563_DEFAULT_ADDRESS, Wire1); | |
void setup() { | |
// Init lcd | |
lcd.init(); |
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
#include "M5Lite.h" | |
static LGFX_Sprite sprite(&M5Lite.Lcd); | |
void setup() { | |
unsigned long time[100] = {}; | |
int timeCnt = 0; | |
M5Lite.begin(); |
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
#include "M5Lite.h" | |
static LGFX_Sprite sprite[2](&M5Lite.Lcd); | |
void setup() { | |
unsigned long startTime; | |
unsigned long endTime; | |
M5Lite.begin(); |
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
#include "M5Lite.h" | |
static LGFX_Sprite sprite[2](&M5Lite.Lcd); | |
static LGFX_Sprite spritePSRAM[2](&M5Lite.Lcd); | |
void setup() { | |
unsigned long startTime; | |
unsigned long endTime; | |
M5Lite.begin(); |