Skip to content

Instantly share code, notes, and snippets.

View islandcontroller's full-sized avatar

islandc_ islandcontroller

View GitHub Profile
@fay59
fay59 / Quirks of C.md
Last active January 23, 2024 04:24
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;
@unforgiven512
unforgiven512 / README.md
Last active February 7, 2023 06:20
UCF file for Digilent Xilinx CoolRunner-II CPLD Starter Board

User Constraints File for Digilent CoolRunner-II CPLD Starter Board

This is intended to be a complete and ready-to-use user constraints file for the [Digilent CoolRunner-II CPLD Starter Board][1] to ease the creation of projects within the Xilinx ISE software.

Hardware Interface Overview

Below is a list of the high-level I/O components featured on the board:

  • LEDs - 4
The USB Blaster udev rules on the Altera website
( http://www.altera.com/download/drivers/dri-usb_b-lnx.html )
did not work for me on Debian Jessie/Sid. A modified version of the file, listed below, works for me
(this is the contents of /etc/udev/rules.d/51-usbblaster.rules ). After restarting udev
(`sudo service udev restart`) I was able to program the DE0-Nano.
# USB-Blaster
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6002", MODE="0666", GROUP="plugdev"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6003", MODE="0666", GROUP="plugdev"