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
package main | |
import ( | |
"image/color" | |
"machine" | |
"time" | |
"tinygo.org/x/drivers/ili9341" | |
"tinygo.org/x/tinyfont" | |
) |
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
package main | |
import ( | |
"fmt" | |
"image/color" | |
"machine" | |
"time" | |
"tinygo.org/x/drivers/ili9341" | |
"tinygo.org/x/tinyfont" |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"time" | |
"go.bug.st/serial" | |
) |
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
// +build atsamd51 | |
// Put this file in the main package directory | |
// https://github.com/tinygo-org/tinygo/issues/944#issuecomment-597065613 | |
// http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0439b/BEHBJHIG.html | |
package main | |
import ( | |
"runtime/volatile" |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"machine" | |
"os" | |
"strconv" | |
"strings" | |
"time" |
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
at_spi_write('AT+CWMODE=1\r\n', 13, 500) | |
at_spi_read ('OK\r\n', 4, 500) | |
at_spi_write('AT+CWMODE?\r\n', 12, 500) | |
at_spi_read ('+CWMODE:1\r\nOK\r\n', 15, 500) | |
at_spi_write('AT+CWQAP\r\n', 10, 500) | |
at_spi_read ('OK\r\n', 4, 500) | |
at_spi_write('AT+CWMODE?\r\n', 12, 500) | |
at_spi_read ('+CWMODE:1\r\nOK\r\n', 15, 500) | |
at_spi_write('AT+CWQAP\r\n', 10, 500) | |
at_spi_read ('OK\r\n', 4, 500) |
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
set -e | |
BUILD_DIR=${HOME}/openocd-windows | |
LIBUSB1_BUILD_DIR=${BUILD_DIR}/libusb | |
LIBUSB0_BUILD_DIR=${BUILD_DIR}/libusb-compat | |
LIBCONFUSE_BUILD_DIR=${BUILD_DIR}/libconfuse | |
HIDAPI_BUILD_DIR=${BUILD_DIR}/hidapi | |
LIBFTDI_BUILD_DIR=${BUILD_DIR}/libftdi | |
mkdir -p ${BUILD_DIR} | |
cd ${BUILD_DIR} |
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
(gdb) disassemble | |
Dump of assembler code for function (machine.SPI).txrx: | |
0x00005b82 <+0>: stmdb sp!, {r4, r5, r6, r7, r8, r9, r10, r11, lr} | |
0x00005b86 <+4>: sub sp, #12 | |
=> 0x00005b88 <+6>: cmp r0, #0 | |
0x00005b8a <+8>: str r3, [sp, #8] | |
0x00005b8c <+10>: beq.n 0x5c24 <(machine.SPI).txrx+162> | |
0x00005b8e <+12>: mov r11, r2 | |
0x00005b90 <+14>: cmp r2, #0 | |
0x00005b92 <+16>: beq.n 0x5c20 <(machine.SPI).txrx+158> |
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> | |
#define PIN_BLE_SERIAL_X_RX (84ul) | |
#define PIN_BLE_SERIAL_X_TX (85ul) | |
#define PAD_BLE_SERIAL_X_RX (SERCOM_RX_PAD_2) | |
#define PAD_BLE_SERIAL_X_TX (UART_TX_PAD_0) | |
#define SERCOM_BLE_SERIAL_X sercom0 | |
static Uart rtl_uart(&SERCOM_BLE_SERIAL_X, PIN_BLE_SERIAL_X_RX, PIN_BLE_SERIAL_X_TX, PAD_BLE_SERIAL_X_RX, PAD_BLE_SERIAL_X_TX); |
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
// erpc_idl/rpc_system.erpc | |
@output_dir("erpc_shim") | |
@types_header("rpc_system_header.h") | |
program rpc | |
@group("system") | |
interface rpc_system { |