Skip to content

Instantly share code, notes, and snippets.

@xypron
xypron / dtb_get_top_level_property.c
Last active January 21, 2018 12:43
Show how a flattend file tree is traversed.
/*
* Find value of top level property in device tree.
*
* Copyright (c) 2017 Heinrich Schuchardt <xypron.glpk@gmx.de>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <malloc.h>
#include <stdio.h>
@xypron
xypron / bit_reversed_order.c
Last active September 22, 2020 00:37
Bit reversed order rearrangement of array in O(n) time.
/*
For Fast Fourier Transformations an important step is the rearrangement of the
data in a bit reversed order.
The implemention below shows how to do this inplace or as copy in O(n) runtime.
*/
/*
The MIT License (MIT)