Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Robot Mode: ON

Orso Eric OrsoEric

💭
Robot Mode: ON
View GitHub Profile
View main.cpp
/****************************************************************************
** OrangeBot Project
*****************************************************************************
** /
** /
** /
** ______ \
** \
** \
*****************************************************************************
@OrsoEric
OrsoEric / longan_nano_screen.hpp
Last active Aug 8, 2020
Screen Class. Provide an abstraction layer and asynchronous print methods for the Display Class
View longan_nano_screen.hpp
/**********************************************************************************
BSD 3-Clause License
Copyright (c) 2020, Orso Eric
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
@OrsoEric
OrsoEric / ST7735S_W160_H80_C16.hpp
Last active Aug 8, 2020
Display class. Controls the 80x160 display installed on the Longan Nano. uses SPI0 and DMA0
View ST7735S_W160_H80_C16.hpp
/**********************************************************************************
BSD 3-Clause License
Original Copyright (c) 2019-2020, Samuli Laine
Modified Copyright (c) 2020, Orso Eric
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@OrsoEric
OrsoEric / chrono_scheduler_demo.cpp
Last active Aug 2, 2020
Longan Nano GD32VF103 Chrono Scheduler Demo
View chrono_scheduler_demo.cpp
/****************************************************************************
** OrangeBot Project
*****************************************************************************
** /
** /
** /
** ______ \
** \
** \
*****************************************************************************
@OrsoEric
OrsoEric / longan_nano_chrono.hpp
Created Aug 2, 2020
Longan Nano GD32VF103 Chrono Class
View longan_nano_chrono.hpp
/**********************************************************************************
BSD 3-Clause License
Copyright (c) 2020, Orso Eric
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
@OrsoEric
OrsoEric / longan_nano_led.hpp
Created Aug 2, 2020
Longan Nano RTC PA8 Interrupt
View longan_nano_led.hpp
/**********************************************************************************
** ENVIROMENT VARIABILE
**********************************************************************************/
#ifndef LONGAN_NANO_LED_H_
#define LONGAN_NANO_LED_H_
/**********************************************************************************
** GLOBAL INCLUDES
**********************************************************************************/
@OrsoEric
OrsoEric / int.cpp
Created Aug 2, 2020
Longan Nano RTC PA8 Interrupt
View int.cpp
/****************************************************************************
** int.cpp
*****************************************************************************
** Interrupt Service Routines
** NOTE:
** extern "C" keyword tells the C++ compiler not to mangle the ISR nfunction name
** the Interrupt Vector Table is declared in Start.S and requires special names
** for the ISRs without mangling to link correctly
****************************************************************************/
@OrsoEric
OrsoEric / init.cpp
Created Aug 2, 2020
Longan Nano PA8 RTC Interrupt
View init.cpp
/****************************************************************************
** init.cpp
*****************************************************************************
** Board initializations
** >GPIO
** >EXTI
** >ECLIC
****************************************************************************/
/****************************************************************************
@OrsoEric
OrsoEric / main.cpp
Created Aug 2, 2020
Longan Nano RTC PA8 Interrupts
View main.cpp
/****************************************************************************
** OrangeBot Project
*****************************************************************************
** /
** /
** /
** ______ \
** \
** \
*****************************************************************************
@OrsoEric
OrsoEric / main.cpp
Created Jul 5, 2020
GD32VF103 Longan Nano PA8 interrupt Minimal Example
View main.cpp
#include <gd32vf103.h>
#define EVER (;;)
void init()
{
//Clock the GPIO banks
rcu_periph_clock_enable(RCU_GPIOA);
rcu_periph_clock_enable(RCU_GPIOC);
//Setup the R, G and B LEDs
gpio_init(GPIOA, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ,GPIO_PIN_1);