diff --git a/.gitignore b/.gitignore index 378eac25d311703f3f2cd456d8036da525cd0366..e8cd62822c7e0990633f563c1c8b993610e8a39a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build +.DS_store \ No newline at end of file diff --git a/GPS/GPS.c b/GPS/GPS.c index 9a440f6a374fcd5fd1341df2343d1124eb92a292..803e25e76e811a1c248e5a7e35c5c11ea317a4f5 100644 --- a/GPS/GPS.c +++ b/GPS/GPS.c @@ -20,6 +20,8 @@ volatile int interrupt = 0; gps_t gps_data = {0}; +gps_t gps = {0}; + volatile void __not_in_flash_func (pio_irq0_gps_handler)(void) { @@ -218,9 +220,6 @@ void gps_parse_buffer(char * buffer){ else{ //prinf("Message type: %s -> Unsused\n",section); } - int i = 0; - memset(gps_rx_buffer,0,256); - pointer = 0; } int gps_get_data(gps_t * gps_data){ diff --git a/GPS/GPS.h b/GPS/GPS.h index 6271a9e4ca00d1f62829a75a78204aeab5ab259c..f8f0d3a920f59362d7b93230e6b636990647e793 100644 --- a/GPS/GPS.h +++ b/GPS/GPS.h @@ -17,9 +17,6 @@ #define GPS_2D_FIX 1 #define GPS_3D_FIX 3 -static uint8_t gps_rx_buffer[256]; -static uint16_t pointer; -static int counter = 0; typedef struct{ uint8_t sat; time_t time; @@ -37,8 +34,6 @@ typedef struct{ uint16_t course; } gps_t; -static gps_t gps; - void gps_parse_buffer(char * buffer); int gps_get_data(gps_t * gps_data); diff --git a/PA_PIO.c b/PA_PIO.c index 74de06c6d105870fee59767b8742f5f1d8f45549..4cf4cbe8fa2841faa7f474f916bbaa89c272762b 100644 --- a/PA_PIO.c +++ b/PA_PIO.c @@ -13,7 +13,7 @@ int main() sleep_ms(2000); // gps_init(pio0, 9600); // comparator_init(pio0, 1000, 2); - test(); + test_pio_xor(); while (true) { tight_loop_contents(); } diff --git a/PIO_XOR/pio_xor.c b/PIO_XOR/pio_xor.c index 42b7204ddb659b084cc66a67cbc35a96db2502d2..eeffbebbe1b04934af7c88a95c4c0011e98055cd 100644 --- a/PIO_XOR/pio_xor.c +++ b/PIO_XOR/pio_xor.c @@ -1,6 +1,6 @@ #include "pio_xor.h" -void test(void){ +void test_pio_xor(void){ sleep_ms(1000); uint sm = pio_claim_unused_sm(pio0, true); printf("sm = %i\n",sm); @@ -16,6 +16,7 @@ void test(void){ /* Write the separator (that will trigger an interrupt) */ pio_sm_put(pio0, sm, 0b1110010011100100); + printf("for input 0b11: %x\n", pio_sm_get_blocking(pio0,0)); //pio_sm_put(pio0, sm, 0b10); printf("for input 0b10: %x\n", pio_sm_get_blocking(pio0,0)); diff --git a/PIO_XOR/pio_xor.h b/PIO_XOR/pio_xor.h index f5ce98bdc2d909a44f3796bc30499dcd48bff372..dfe9cd55d3cc5f427b4af5da17e86489293c140c 100644 --- a/PIO_XOR/pio_xor.h +++ b/PIO_XOR/pio_xor.h @@ -7,6 +7,6 @@ #include "hardware/pio.h" #include "pio_xor.pio.h" -void test(void); +void test_pio_xor(void); #endif \ No newline at end of file