pull/1/head
Alan Johnston 7 years ago
parent 01e557a5d0
commit 9e53199bd3

@ -83,6 +83,7 @@ radioafsk: libax5043.a
radioafsk: afsk/ax25.o
radioafsk: afsk/ax5043.o
radioafsk: afsk/main.o
radioafsk: afsk/ina219.h
gcc -o radioafsk -pedantic -Wall -Wextra -L./ afsk/ax25.o afsk/ax5043.o afsk/main.o -lwiringPi -lax5043

@ -72,7 +72,7 @@ typedef enum {
/*
* INA219 Registers
*/
#define INA219_REG_CONFIG 0x00
#define INA219_REG_CONFIG 0x00
#define INA219_REG_SHUNTVOLTAGE 0x01
#define INA219_REG_BUSVOLTAGE 0x02
#define INA219_REG_POWER 0x03

@ -86,7 +86,9 @@ int y_fd; // I2C bus 0
int main(void) {
// sleep(20);
setSpiChannel(SPI_CHANNEL);
setSpiSpeed(SPI_SPEED);
initializeSpi();
int tlm[7][5];
int i, j;
@ -132,10 +134,6 @@ int main(void) {
y_fd = wiringPiI2CSetupInterface("/dev/i2c-0", 0x41);
printf("Opening of Y- fd %d\n", y_fd);
setSpiChannel(SPI_CHANNEL);
setSpiSpeed(SPI_SPEED);
initializeSpi();
int ret;
uint8_t data[1024];
@ -222,6 +220,8 @@ int main(void) {
static void init_rf() {
int ret;
printf("Initializing AX5043\n");
ret = ax5043_init(&hax5043, XTAL_FREQ_HZ, VCO_INTERNAL);
if (ret != PQWS_SUCCESS) {
fprintf(stderr,

Loading…
Cancel
Save

Powered by TurnKey Linux.