This file contains 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
/* Copyright (c) Microsoft Corporation. All rights reserved. */ | |
#include <string.h> | |
/* ISO/IEC 9899 7.11.5.8 strtok. DEPRECATED. | |
* Split string into tokens, and return one at a time while retaining state | |
* internally. | |
* | |
* WARNING: Only one set of state is held and this means that the | |
* WARNING: function is not thread-safe nor safe for multiple uses within |
This file contains 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
__strtok_r(char *s, const char *delim, char **last) | |
{ | |
char *spanp, *tok; | |
int c, sc; | |
if (s == NULL && (s = *last) == NULL) | |
return (NULL); | |
/* | |
* Skip (span) leading delimiters (s += strspn(s, delim), sort of). |
This file contains 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
// MSP430F552x Demo - USCI_B0 I2C Master TX single bytes to MSP430 Slave | |
// | |
// Description: This demo connects two MSP430's via the I2C bus. The master | |
// transmits to the slave. This is the master code. It continuously | |
// transmits 00h, 01h, ..., 0ffh and demonstrates how to implement an I2C | |
// master transmitter sending a single byte using the USCI_B0 TX interrupt. | |
// ACLK = n/a, MCLK = SMCLK = BRCLK = default DCO = ~1.045MHz | |
// | |
// ***to be used with "MSP430F55xx_uscib0_i2c_07.c" *** | |
// |
This file contains 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
//****************************************************************************** | |
// MSP430F552x Demo - USCI_B0 I2C Slave RX single bytes from MSP430 Master | |
// | |
// Description: This demo connects two MSP430's via the I2C bus. The master | |
// transmits to the slave. This is the slave code. The interrupt driven | |
// data receiption is demonstrated using the USCI_B0 RX interrupt. | |
// ACLK = n/a, MCLK = SMCLK = default DCO = ~1.045MHz | |
// | |
// ***to be used with "MSP430F55xx_uscib0_i2c_06.c" *** | |
// |
This file contains 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
uname_r=3.8.13-bone67 | |
#dtb= | |
cmdline=quiet init=/lib/systemd/systemd | |
##Example | |
#cape_disable=capemgr.disable_partno= | |
#cape_enable=capemgr.enable_partno= |
This file contains 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
loadximage=load mmc 0:2 ${loadaddr} /boot/vmlinuz-${uname_r} | |
loadxfdt=load mmc 0:2 ${fdtaddr} /boot/dtbs/${uname_r}/${fdtfile} | |
loadxrd=load mmc 0:2 ${rdaddr} /boot/initrd.img-${uname_r}; setenv rdsize ${filesize} | |
loaduEnvtxt=load mmc 0:2 ${loadaddr} /boot/uEnv.txt ; env import -t ${loadaddr} ${filesize}; | |
check_dtb=if test -n ${dtb}; then setenv fdtfile ${dtb};fi; | |
loadall=run loaduEnvtxt; run check_dtb; run loadximage; run loadxrd; run loadxfdt; | |
mmcargs=setenv bootargs console=tty0 console=${console} ${optargs} ${cape_disable} ${cape_enable} root=/dev/mmcblk0p2 rootfstype=${mmcrootfstype} ${cmdline} | |
uenvcmd=run loadall; run mmcargs; bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}; |
This file contains 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
/*************** | |
Use the code to drive interrupt function. | |
When input "high" to GPIO-20, the GPIO-7 will output a signal between high and low. | |
****************/ | |
#include <linux/fs.h> | |
#include <linux/gpio.h> | |
#include <linux/interrupt.h> | |
#include <linux/module.h> | |
#include <rtdm/rtdm_driver.h> |
This file contains 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
EXTRA_CFLAGS := -I/home/emp-chen/git/bbb/xenomai-2.6.4/include | |
ifneq (${KERNELRELEASE},) | |
obj-m += oscillateur-gpio-rtdm.o | |
else | |
ARCH ?= arm | |
CROSS_COMPILE ?= /home/emp-chen/linux-arm-genuhbi- | |
KERNEL_DIR = /home/emp-chen/git/bbb/beagle-kernel/kernel |
This file contains 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 <linux/cdev.h> | |
#include <linux/device.h> | |
#include <linux/fs.h> | |
#include <linux/gpio.h> | |
#include <linux/module.h> | |
#include <linux/sched.h> | |
#include <linux/version.h> | |
#include <asm/uaccess.h> |
This file contains 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
/* --COPYRIGHT--,BSD_EX | |
* Copyright (c) 2012, Texas Instruments Incorporated | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: | |
* | |
* * Redistributions of source code must retain the above copyright | |
* notice, this list of conditions and the following disclaimer. |
NewerOlder