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<stdio.h> | |
int Fib(int x); | |
int Fib(int x) | |
{ | |
if(x==0)return 0; | |
if(x==1)return 1; | |
return fib(x-1)+fib(x-2); | |
} | |
int main(void) | |
{ |
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
##This will work with: Angstrom's 2013.06.20 u-boot. | |
loadaddr=0x82000000 | |
fdtaddr=0x88000000 | |
rdaddr=0x88080000 | |
initrd_high=0xffffffff | |
fdt_high=0xffffffff | |
loadximage=load mmc 0:2 ${loadaddr} /boot/vmlinuz-${uname_r} |
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. |
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. |
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
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
/*************** | |
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
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
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
//****************************************************************************** | |
// 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" *** | |
// |
OlderNewer