Skip to content

Instantly share code, notes, and snippets.

@mitjakukovec
mitjakukovec / main.c
Created April 3, 2018 19:10 — forked from Wollw/main.c
#include <stdio.h>
#include "serial.h"
#include <avr/pgmspace.h>
int main(void) {
serial_init(19200);
int i;
char buffer[8];
@mitjakukovec
mitjakukovec / interrupt_example.c
Created April 3, 2018 19:10 — forked from Wollw/interrupt_example.c
AVR Timer Interrupt Examples
#include <avr/io.h>
#include <avr/interrupt.h>
#include <stdbool.h>
/*
* A global flag used to communicate between the Interrupt Service Routine
* and the main program. It has to be declared volatile or the compiler
* might optimize it out.
*/
volatile bool update = false;
@mitjakukovec
mitjakukovec / pcint_example.c
Created April 3, 2018 19:10 — forked from Wollw/pcint_example.c
ATMega328P PCINT example
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/atomic.h>
#include <util/delay.h>
#include <stdbool.h>
/*
* A global flag used to communicate between the Interrupt Service Routine
* and the main program. It has to be declared volatile or the compiler
* might optimize it out.
@mitjakukovec
mitjakukovec / imguiverticaltext.h
Created June 28, 2016 18:44 — forked from Flix01/imguiverticaltext.h
ImDrawList methods to display vertical text in ImGui
#pragma once
#include <imgui.h>
#include <imgui_internal.h>
// ImDrawList methods to display vertical text
/*
// TEST: inside a window:
ImGuiWindow* window = ImGui::GetCurrentWindow();
ImDrawList* dl = window->DrawList;
@mitjakukovec
mitjakukovec / .gdbinit
Last active August 29, 2015 14:08 — forked from skyscribe/.gdbinit
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file