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
repos: | |
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v3.2.0 | |
hooks: | |
- id: trailing-whitespace | |
- repo: local | |
hooks: | |
# Run astyle over the staged files with c and h extension found in the directories | |
# listed in the files regex pattern. Ignoring the files in the exclude pattern. | |
- id: format-source |
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
use std::fs::File; | |
use std::io::prelude::*; | |
use serialport::available_ports; | |
fn main() { | |
let mut file = File::open("info.txt").expect("Can't open the file"); | |
let mut contents = String::new(); |
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
/** | |
* @file disp_spi.c | |
* | |
*/ | |
/********************* | |
* INCLUDES | |
*********************/ | |
#include <string.h> |
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 DEBUG_MP3_PLAYER | |
#ifdef DEBUG_MP3_PLAYER | |
#define DEBUG_(fmt, ...) \ | |
DBG_println(fmt, __VA_ARGS__) | |
#define DEBUG(...) \ | |
DEBUG_(__VA_ARGS__, "") | |
#else | |
#define DEBUG(fmt, ...) | |
#endif |
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
## Creando custom board basados en el board B-L072Z-LRWAN1 ## | |
# Clonamos el repositorio de LoRaMac-node | |
$ git clone https://github.com/Lora-net/LoRaMac-node.git | |
# Entramos a LoRaMac-node/src/boards y copiamos el directorio B-L072Z-LRWAN1, | |
# al nuevo directorio le asignamos el nombre de nuetro board, por ejemplo FOO | |
$ cd LoRaMac-node/src/boards |
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
r | |
h | |
erase | |
w2 0x41004000, 0xA51A | |
loadbin bootloader-grandcentral_m4-v3.6.0.bin, 0x0 | |
verifybin bootloader-grandcentral_m4-v3.6.0.bin, 0x0 | |
r | |
qc |
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
# Add i2s to nrf52 | |
Go to ports/nrf/common-hal/audiobusio/I2SOut.h y I2SOut.c | |
revisar el common-hal de atmel-samd para referencia. | |
Implementar las funciones definidas en shared-bindings/audiobusio/I2SOut.h y I2SOut.c / PDMIn.h y PDMIn.c | |
NOTA: shared-bindings son la relacion entre python y el código en C | |
La hal de los chips de nordic se basa en: https://github.com/adafruit/nrfx |
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
export PATH="$HOME/esp/xtensa-esp32-elf/bin:$PATH" | |
export IDF_PATH=~/esp/esp-idf | |
export PATH="$IDF_PATH/tools:$PATH" | |
# ADD INCLUDE PATHS | |
Edit component.mk | |
(from https://esp32.com/viewtopic.php?t=958) | |
See: https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html?highlight=component#component-makefiles |
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
LD_FILE = boards/samd21x18-bootloader.ld | |
USB_VID = 0x1209 | |
USB_PID = 0xBAB3 | |
USB_PRODUCT = "Bast Pro Mini RGB M0" | |
USB_MANUFACTURER = "Electronic Cats" | |
INTERNAL_FLASH_FILESYSTEM = 1 | |
LONGINT_IMPL = NONE | |
CIRCUITPY_SMALL_BUILD = 1 |
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 MICROPY_HW_BOARD_NAME "Electronic Cats Bast Pro Mini RGB M0" | |
#define MICROPY_HW_MCU_NAME "samd21e18" | |
#define MICROPY_PORT_A (0) | |
#define MICROPY_PORT_B (0) | |
#define MICROPY_PORT_C (0) | |
#define CIRCUITPY_INTERNAL_NVM_SIZE 0 | |
#define CP_RGB_STATUS_R (&pin_PA15) |
NewerOlder