Skip to content
Snippets Groups Projects
Commit 7748c882 authored by Giovanni Mangano's avatar Giovanni Mangano
Browse files

Init

parent 62326511
No related branches found
No related tags found
No related merge requests found
build
.DS_store
\ No newline at end of file
......@@ -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){
......
......@@ -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);
......
......@@ -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();
}
......
#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));
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment