Created file architecture for arduino build
1 parent a0e83ee commit bdc13bef7854d8dc98fb787282606208dd9e553c
@David Whale David Whale authored on 3 Apr 2016
Showing 8 changed files
View
44
src/energenie/drv/build 100755 → 0
#! /bin/bash
 
 
# build gpio_test
gcc gpio_test.c gpio.c
mv a.out gpio_test
chmod u+x gpio_test
 
 
# build spis_test (soft SPI tester)
gcc spi_test.c spis.c gpio.c
mv a.out spis_test
chmod u+x spis_test
 
# build spih_test (hard SPI tester)
gcc spi_test.c spih.c gpio.c
mv a.out spih_test
chmod u+x spish_test
 
 
# build hrf69_test
## gcc hrf69_test.c hrf69.c spis.c gpio.c
## mv a.out hrf69_test
## chmod u+x hrf69_test
 
 
# build radio_test
## gcc radio_test.c radio.c hrf69.c spis.c gpio.c
## mv a.out radio_test
## chmod u+x radio_test
 
 
# build spi .so library on Raspberry Pi
gcc -Wall -shared -o spi_rpi.so -fPIC spis.c gpio.c
# nm -D spi_rpi.so
cp spi_rpi.so ..
 
# radio spi .so library on Raspberry Pi
## gcc -Wall -shared -o radio_rpi.so -fPIC radio.c hrf69.c spis.c gpio.c
## nm -D radio_rpi.so
## cp radio_rpi.so ..
 
# END
View
45
src/energenie/drv/build_rpi 0 → 100755
#! /bin/bash
 
# build file for Raspberry Pi use
 
# build gpio_test
gcc gpio_test.c gpio.c
mv a.out gpio_test
chmod u+x gpio_test
 
 
# build spis_test (soft SPI tester)
gcc spi_test.c spis_rpi.c gpio.c
mv a.out spis_test
chmod u+x spis_test
 
# build spih_test (hard SPI tester)
gcc spi_test.c spih_rpi.c gpio.c
mv a.out spih_test
chmod u+x spish_test
 
 
# build hrf69_test
## gcc hrf69_test.c hrf69.c spis_rpi.c gpio.c
## mv a.out hrf69_test
## chmod u+x hrf69_test
 
 
# build radio_test
## gcc radio_test.c radio.c hrf69.c spis_rpi.c gpio.c
## mv a.out radio_test
## chmod u+x radio_test
 
 
# build spi .so library on Raspberry Pi
gcc -Wall -shared -o spi_rpi.so -fPIC spis_rpi.c gpio.c
# nm -D spi_rpi.so
cp spi_rpi.so ..
 
# radio spi .so library on Raspberry Pi
## gcc -Wall -shared -o radio_rpi.so -fPIC radio.c hrf69.c spis_rpi.c gpio.c
## nm -D radio_rpi.so
## cp radio_rpi.so ..
 
# END
View
66
src/energenie/drv/spih.c 100644 → 0
/* spih.c (Hard SPI) D.J.Whale 19/07/2014
*/
 
 
/***** INCLUDES *****/
 
//#include <stdio.h>
//#include <stdlib.h>
//#include <time.h>
//#include <sys/time.h>
//#include <string.h>
 
//#include "spi.h"
//#include "gpio.h"
 
 
 
/***** VARIABLES *****/
 
static SPI_CONFIG config;
 
 
void spi_init_defaults(void)
{
//TODO
}
 
 
void spi_init(SPI_CONFIG* pConfig)
{
//TODO
}
 
 
void spi_finished(void)
{
//TODO
}
 
 
void spi_select(void)
{
//TODO
}
 
 
void spi_deselect(void)
{
//TODO
}
 
 
int spi_byte(int txbyte)
{
//TODO
}
 
 
void spi_frame(unsigned char* pTx, unsigned char* pRx, unsigned char count)
{
//TODO
}
 
 
/***** END OF FILE *****/
View
7
src/energenie/drv/spih_arduino.c 0 → 100644
// placeholder for arduino SPI hardware driver
//
// This will be used to aid porting to the arduino.
// The arduino has more predictable timing than the Raspberry Pi,
// and thus it is a much better test suite platform.
 
View
src/energenie/drv/spih_rpi.c 0 → 100644
View
src/energenie/drv/spis.c 100644 → 0
View
src/energenie/drv/spis_arduino.c 0 → 100644
View
src/energenie/drv/spis_rpi.c 0 → 100644