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
// ADC driver assumes all the GPIO was already placed in 'AIN' mode | |
DMA_DeInit(DMA1_Channel1); | |
dma.DMA_PeripheralBaseAddr = (uint32_t)&ADC1->DR; | |
dma.DMA_MemoryBaseAddr = (uint32_t)adcValues; | |
dma.DMA_DIR = DMA_DIR_PeripheralSRC; | |
dma.DMA_BufferSize = numChannels; | |
dma.DMA_PeripheralInc = DMA_PeripheralInc_Disable; | |
dma.DMA_MemoryInc = numChannels > 1 ? DMA_MemoryInc_Enable : DMA_MemoryInc_Disable; | |
dma.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord; | |
dma.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord; |
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
prerequisites: | |
as root: | |
apt-get install build-essential git cmake pkg-config g++-multilib libzip-dev | |
dpkg --add-architecture i386 | |
as normal user: | |
1. extractor | |
git clone https://github.com/minecraft-linux/mcpelauncher-extract.git |
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
1. https://github.com/gnu-mcu-eclipse/org.eclipse.epp.packages/releases/ | |
2. https://github.com/gnu-mcu-eclipse/windows-build-tools/releases | |
3. https://github.com/gnu-mcu-eclipse/riscv-none-gcc/releases | |
unzip #1 to ex. f:\eclipse | |
unzip #2 and #3 to %appdata%\GNU MCU Eclipse | |
\GNU MCU Eclipse\Build Tools | |
\GNU MCU Eclipse\RISC-V Embedded GCC | |
Start Eclipse |
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
cmake -DRKPLATFORM=ON -DHAVE_DRM=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Release |
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
#define _WIN32_LEAN_AND_MEAN | |
#include <winsock2.h> | |
#include <ws2tcpip.h> | |
#include <iphlpapi.h> | |
#include <Windows.h> | |
#include <stdio.h> | |
#pragma comment(lib, "iphlpapi.lib") | |
#pragma comment(lib, "Ws2_32.lib") |