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
| #!/usr/bin/env bash | |
| function printUsage() { | |
| echo "Usage: $0 <OPTIONS>" | |
| echo " OPTIONS:" | |
| echo " -e <= EEprom file location" | |
| echo " -f <= Flash file location" | |
| echo " -? -h --? --help <= Help info" | |
| echo "" | |
| } |
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 <SPI.h> | |
| class M35080 { | |
| private: | |
| // M35080 Properties | |
| static constexpr uint8_t PAGE_SIZE = {0x20u}; // 32 bytes | |
| static constexpr uint16_t MEMORY_SIZE = {0x400u}; // 1024 bytes => 8 Kbits | |
| static constexpr uint8_t PAGE_COUNT = {MEMORY_SIZE / PAGE_SIZE}; | |
| static constexpr uint8_t WRITE_CYCLE_TIMEOUT_MS = {0x0Au}; // 10 Milliseconds |
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
| #!/usr/bin/env bash | |
| function printUsage() { | |
| echo "Usage: $0 <OPTIONS>" | |
| echo " OPTIONS:" | |
| echo " -f <= EEprom file location" | |
| echo " -? -h --? --help <= Help info" | |
| echo "E.g., bash VagEdc16Decoder.sh -f EEpromfile.bin" | |
| echo "" | |
| } |
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 "pins_arduino.h" | |
| #if !defined(USE_INTERNAL_PULL_UP_RESISTORS) | |
| #define USE_INTERNAL_PULL_UP_RESISTORS // Comment if encoder have inbuilt pull-up resistors | |
| #endif | |
| // Pins connected to the encoder | |
| #if defined(ESP8266) |
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 | |
| function debloat() { | |
| local bloatware=( | |
| "com.huawei.tips" | |
| "com.huawei.hwid" | |
| "com.huawei.gamebox" | |
| "com.huawei.browser" | |
| "com.huawei.scanner" | |
| "com.huawei.hwsearch" |
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 "../Peripheral/inc/ch32v30x_gpio.h" | |
| #include "../Peripheral/inc/ch32v30x_usart.h" | |
| #include "../Peripheral/inc/ch32v30x_tim.h" | |
| #include "../Peripheral/inc/ch32v30x_can.h" | |
| //#include "stdbool.h" | |
| #include "string.h" | |
| #include "stdarg.h" | |
| //#define CAN_DEBUG Uncomment to use CAN LoopBack Mode |
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
| // The C167CR enters BSL mode if pin P0L.4 is sampled low at the end of a hardware reset. | |
| constexpr const uint8_t BSL_PIN_0 = 9; | |
| constexpr const uint8_t bootstrapCode[32] = { | |
| //0xE6, 0x0B, 0x40, 0xFA, // MOV STKUN, #0FA40h ; Set Stack Underflow Pointer register | |
| //0xE6, 0x0A, 0x20, 0xFA, // MOV STKOV, #0FA20h ; Set Stack Overflow Pointer register | |
| 0xE6, 0x08, 0xE0, 0xFF, // MOV CP, #0FFE0h ; Set Context Pointer register | |
| 0xE6, 0xF0, 0x00, 0x00, // MOV R0, #00000h ; Move IROM(Internal ROM) start address to R0 | |
| // WaitTransmOver: |
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
| #ifdef __cplusplus | |
| extern "C" { | |
| #endif | |
| #include "gd32vf103.h" | |
| #include "gd32vf103_rcu.h" | |
| #include "gd32vf103_gpio.h" | |
| #include "gd32vf103_usart.h" | |
| #include "gd32vf103_eclic.h" | |
| #include "gd32vf103_can.h" | |
| #ifdef __cplusplus |
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
| #ifdef __cplusplus | |
| extern "C" { | |
| #endif | |
| #include "gd32vf103_rcu.h" | |
| #include "gd32vf103_gpio.h" | |
| #include "gd32vf103_usart.h" | |
| #ifdef __cplusplus | |
| } | |
| #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
| #include "debug.h" | |
| #include "ch32v20x_can.h" | |
| //#include "stdbool.h" | |
| #include "string.h" | |
| #include "stdarg.h" | |
| constexpr uint32_t SERIAL_SPEED = 115200; | |
| constexpr uint16_t LedPin = uint16_t(1) << 0; // PA0 | |
| constexpr uint16_t UartTxPin = uint16_t(1) << 2; // PA2 |
NewerOlder