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 <hls_stream.h> | |
| #include <ap_int.h> | |
| void swap_endian(hls::stream<ap_uint<32> >& in, hls::stream<ap_uint<32> >& out) | |
| { | |
| ap_uint<32> data; | |
| in >> data; | |
| out << (data.range(7, 0), data.range(15, 8), data.range(23, 16), data.range(31, 24)); | |
| } |
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
| extern crate bindgen; | |
| extern crate walkdir; | |
| use std::env; | |
| use std::path::PathBuf; | |
| use walkdir::WalkDir; | |
| fn main() { | |
| let idf_components_path = PathBuf::from(env::var("IDF_PATH").unwrap()).join("components"); | |
| let xtensa_toolchain_path = PathBuf::from(env::var("XTENSA_TOOLCHAIN_PATH").unwrap()); |
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
| #![no_std] | |
| #![feature(lang_items, alloc_error_handler, alloc)] | |
| use core::panic::PanicInfo; | |
| use core::alloc::{GlobalAlloc, Layout}; | |
| use core::fmt; | |
| use core::fmt::Write; | |
| use core::convert::From; | |
| use core::ptr; | |
| use core::mem; | |
| use core::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
| import time | |
| import machine | |
| import network | |
| import esp | |
| import usocket | |
| try: | |
| from typing import Tuple, Callable, List, Optional | |
| from builtins import const | |
| except: |
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
| MicroPython v1.11-127-g71019d174 on 2019-08-02; ESP32 module with ESP32 | |
| Type "help()" for more information. | |
| >>> | |
| >>> | |
| >>> import machine | |
| >>> i2c = machine.I2C(1, sda=21, scl=22, speed=400000) | |
| >>> i2c.scan() | |
| [14, 104, 117] | |
| >>> [hex(x) for x in i2c.scan()] | |
| ['0xe', '0x68', '0x75'] |
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 PMU | |
| { | |
| private: | |
| I2CMaster& i2c; | |
| std::uint8_t address; | |
| static constexpr std::uint8_t AXP192_REG_EXTEN_DCDC2_OUTPUT_CONFIG = 0x10; | |
| static constexpr std::uint8_t AXP192_REG_LDO2_LDO3_OUTPUT_VOLTAGE = 0x28; |
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> |
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
| 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
| 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 |