Skip to content

Instantly share code, notes, and snippets.

View OrsoEric's full-sized avatar
💭
Robot Mode: ON

Orso Eric OrsoEric

💭
Robot Mode: ON
View GitHub Profile
/****************************************************************************
** OrangeBot Project
*****************************************************************************
** /
** /
** /
** ______ \
** \
** \
*****************************************************************************
@OrsoEric
OrsoEric / longan_nano_screen.hpp
Last active August 8, 2020 08:16
Screen Class. Provide an abstraction layer and asynchronous print methods for the Display Class
/**********************************************************************************
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 August 8, 2020 08:17
Display class. Controls the 80x160 display installed on the Longan Nano. uses SPI0 and DMA0
/**********************************************************************************
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 August 2, 2020 09:58
Longan Nano GD32VF103 Chrono Scheduler Demo
/****************************************************************************
** OrangeBot Project
*****************************************************************************
** /
** /
** /
** ______ \
** \
** \
*****************************************************************************
@OrsoEric
OrsoEric / longan_nano_chrono.hpp
Created August 2, 2020 09:43
Longan Nano GD32VF103 Chrono Class
/**********************************************************************************
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 August 2, 2020 06:26
Longan Nano RTC PA8 Interrupt
/**********************************************************************************
** ENVIROMENT VARIABILE
**********************************************************************************/
#ifndef LONGAN_NANO_LED_H_
#define LONGAN_NANO_LED_H_
/**********************************************************************************
** GLOBAL INCLUDES
**********************************************************************************/
@OrsoEric
OrsoEric / int.cpp
Created August 2, 2020 06:25
Longan Nano RTC PA8 Interrupt
/****************************************************************************
** 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 August 2, 2020 06:24
Longan Nano PA8 RTC Interrupt
/****************************************************************************
** init.cpp
*****************************************************************************
** Board initializations
** >GPIO
** >EXTI
** >ECLIC
****************************************************************************/
/****************************************************************************
@OrsoEric
OrsoEric / main.cpp
Created August 2, 2020 06:23
Longan Nano RTC PA8 Interrupts
/****************************************************************************
** OrangeBot Project
*****************************************************************************
** /
** /
** /
** ______ \
** \
** \
*****************************************************************************
@OrsoEric
OrsoEric / main.cpp
Created July 5, 2020 07:09
GD32VF103 Longan Nano PA8 interrupt Minimal Example
#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);