Difference between revisions of "User:FabienM"

From ArmadeusWiki
Jump to: navigation, search
(Participation à la documentation ArmadeuS Project)
(Trash)
Line 28: Line 28:
 
* [[APF27_FPGA-IMX_interface_description | Description of FPGA-IMX interface for APF27]]
 
* [[APF27_FPGA-IMX_interface_description | Description of FPGA-IMX interface for APF27]]
 
* [[APF51_FPGA-IMX_interface_description | Description of FPGA-IMX interface for APF51]]
 
* [[APF51_FPGA-IMX_interface_description | Description of FPGA-IMX interface for APF51]]
 +
* [[FPGA | FPGA on APF introduction]]
  
 
== Projets ==
 
== Projets ==

Revision as of 17:20, 13 October 2011

<< liste des membres

Présentation

come back soon.

Mes petites bidouilles avec l'armadeus

Peripheral On Demand

Participation à la documentation ArmadeuS Project

Trash

Projets

Liens utiles

Somes usefull tricks

press a button

Here, function to «press enter to continue» on apf in different languages :

setbit /proc/driver/gpio/portFmode 13 1 # set pin as gpio
setbit /proc/driver/gpio/portFdir 13 0  # set pin as input
setbit /proc/driver/gpio/portFirq 13 1  # irq on rising edge

/usr/bin/testsuite/testbutton /dev/gpio/PF13 3

With testbutton program comming from target/linux/modules/fpga/wishbone_example/wb_button. Type «make» in this directory to compile it.

Logging with timestamps in seconds

#!/bin/sh
while true
do
LIGHT=$(cat /sys/class/hwmon/hwmon0/device/in3_input)
TIME=$(date +%s)
echo $TIME", sec, "$LIGHT", mV," >> log;
sleep 2
done

Press enter to continue

C

#include <stdio.h>

void pressEnterToContinue(void)
{
    printf("Press enter to continue\n");
    getc(stdin);//XXX 
    while( getc(stdin) != '\n') ; 
}

C++

#include <stdio.h> //XXX
#include <iostream>

void pressEnterToContinue(void)
{
    cout << "Press enter to continue" << endl;
    getc(stdin); //XXX
    std::cin.ignore( std::numeric_limits <std::streamsize> ::max(), '\n' );
}

Python

def pressEnterToContinue():
    print "Press enter to continue"
    raw_input()

bac à sable

Indus.png

Fichier:plop.tar.bz2