Skip to content

Instantly share code, notes, and snippets.

View maxgerhardt's full-sized avatar

Maximilian Gerhardt maxgerhardt

  • Germany, Bochum
  • 12:45 (UTC +02:00)
View GitHub Profile
@maxgerhardt
maxgerhardt / arduinowch_package_index.json
Last active December 1, 2023 13:13
Arduino WCH32 with Mac+Linux toolchain
{
"packages": [
{
"name": "WCH",
"websiteURL": "https://www.wch.cn/",
"maintainer": "WCH",
"email": "tech@wch.cn",
"help": {
"online": "https://www.wch.cn/"
},
/* Copyright (C) 2015 Roger Clark <www.rogerclark.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*
* Utility to send the reset sequence on RTS and DTR and chars
* which resets the libmaple and causes the bootloader to be run
@maxgerhardt
maxgerhardt / main.c
Created February 25, 2023 23:55
Timer2 GD32F30x test
#include "gd32f30x.h"
#define LEDPORT GPIOC
#define LEDPIN GPIO_PIN_13
#define LED_CLOCK RCU_GPIOC
uint32_t getTimerClkFrequency(uint32_t instance)
{
rcu_clock_freq_enum timerclkSrc = 0;
uint32_t APBx_PSC = 0;
/*
// Para verificar a SRAM
#include <malloc.h>
#include <stdlib.h>
#include <stdio.h>
extern char _end;
extern "C" char *sbrk(int i);
char *ramstart=(char *)0x20070000;
char *ramend=(char *)0x20088000;
{
"framework-arduino-lpc176x": [
{
"url": "https://github.com/p3p/pio-framework-arduino-lpc176x/archive/0.1.3.zip",
"version": "0.1.3"
},
{
"url": "https://github.com/p3p/pio-framework-arduino-lpc176x/archive/0.1.2.zip",
"version": "0.1.2"
},