This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
volatile uint8_t recv_buf[BUF_LEN]; | |
volatile uint8_t recv_buf_idx = 0; | |
/* ... */ | |
/* EUSCI A0 UART ISR - Echoes data back to PC host */ | |
void euscia0_isr(void) | |
{ | |
// If this interrupt is an RX interrupt | |
if (EUSCI_A_CMSIS(EUSCI_A0_MODULE)->rIE.r & EUSCI_A_UART_RECEIVE_INTERRUPT) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[negroni] Completed 200 OK in 3.955256ms | |
[negroni] Started GET /authfail | |
[negroni] Completed 200 OK in 10.011542ms | |
[negroni] Started GET /authfail | |
[negroni] Completed 200 OK in 9.598809ms | |
[negroni] Started GET /authfail | |
[negroni] Completed 200 OK in 11.324298ms | |
[negroni] Started GET /authfail | |
cannot handle page request order 16/0x1000! | |
panic: fatal error: malloc deadlock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# XXX | |
# When building the latest version of Python (3.5.1) some binaries are built in order | |
# to build other binaries. For example, we need the Parser/pgen binary to generate a | |
# parser from the Grammar file. This requires us to build some *host* binaries before | |
# we apply patches and build the target (-rumprun) version of Python. | |
# | |
# The problem is that the 'hostbuild' task looks like it could be done better. I'm | |
# looking for ideas to improve that piece. | |
include ../Makefile.inc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Monitor GPIO for button press | |
* https://www.kernel.org/doc/Documentation/gpio/gpio.txt | |
* drivers/gpio/gpiolib.c | |
* | |
* This is a simple kernel module to detect the duration of a button press on a Raspberry Pi 2. | |
* The button press durations are stored in a kfifo. A character device can be read, and the | |
* next available button press will be sent to user space. Only one process can read from | |
* the character device at a time. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/Modules/makesetup 2015-02-25 06:27:46.000000000 -0500 | |
+++ b/Modules/makesetup 2015-11-11 16:18:44.831994585 -0500 | |
@@ -128,7 +128,7 @@ | |
# Output DEFS in reverse order so first definition overrides | |
case $line in | |
- *=*) DEFS="$line$NL$DEFS"; continue;; | |
+ [A-Za-z]*=*) DEFS="$line$NL$DEFS"; continue;; | |
'include '*) DEFS="$line$NL$DEFS"; continue;; | |
'*noobjects*') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <unistd.h> | |
int | |
main() | |
{ | |
for(;;) | |
sleep(10); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
import struct | |
import fcntl | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sockfd = sock.fileno() | |
#define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */ | |
SIOCGIFADDR = 0xc0206921 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PATH=/home/rday/Development/os/rump/qemu/bin:$PATH:/home/rday/Development/os/rump/rumprun/app-tools | |
cython --embed -v -3 -Werror main.py | |
x86_64-rumprun-netbsd-gcc main.c -I../Python-3.4.3/pythondist/include/python3.4m -L../Python-3.4.3/pythondist/lib -lpython3.4m -lutil -lm -lz -lssl -lcrypto | |
rumpbake hw_virtio a.bin a.out | |
rumprun qemu -D 1234 -i \ | |
-I if,vioif,'-net tap,ifname=tap0,script=no'\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;NASM=nasm | |
;LD=ld | |
;LIBS=-lc | |
;LD_INCLUDES=-I/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 | |
; | |
; | |
;echoserver: echoserver.o | |
; ${LD} ${LIBS} ${LD_INCLUDES} -o echoserver echoserver.o | |
; | |
;echoserver.o: echoserver.s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Example of accessing the notes slides of a presentation. | |
Requires python-pptx 0.5.6 or later. | |
[email protected] | |
""" | |
from pptx.util import lazyproperty, Pt | |
from pptx.parts.slide import BaseSlide, Slide, _SlideShapeTree, _SlidePlaceholders | |
from pptx.shapes.shape import BaseShape |