Skip to content

Instantly share code, notes, and snippets.

@austinglaser
austinglaser / LICENSE
Last active January 5, 2020 02:35
WS2812 Driver under ChibiOS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
@austinglaser
austinglaser / gcov_project.yml
Created July 17, 2016 21:41
Basic configuration for Ceedling using the gcov plugin
---
# Notes:
# Sample project C code is not presently written to produce a release artifact.
# As such, release build options are disabled.
# This sample, therefore, only demonstrates running a collection of unit tests.
:project:
:use_exceptions: FALSE
:use_test_preprocessor: TRUE
int bstNode<Item>::increment(int count)
{
increment(count);
if (left_field)
count= left_field->size()+1;
else
{ return 0;}
if (right_field)
count= left_field->size()+1;
else
@austinglaser
austinglaser / equivalent_trees.txt
Created January 31, 2013 05:44
Two binary trees
Expected:
1
/\
/ \
0 4
/
/
3
/
@austinglaser
austinglaser / alternate_main.cpp
Last active December 11, 2015 23:18
An alternate main for binary_search_tree_driver.cpp
void printUsage(char call[]) {
cout << " Usage: " << call << " [--retrograde]" << endl;
}
int main (int argc, char* argv[])
{
if (argc == 2 && strcmp(argv[1], "--retrograde") == 0) RETROGRADE_MODE = 1;
else if (argc != 1) {
printUsage(argv[0]);
return -1;