Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Commit a2ad45f

Browse files
committed
directory reorganisation
1 parent 16bea65 commit a2ad45f

9 files changed

+24
-22
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ Temporary Items
5555
*.swp
5656

5757
# Zephyr build files
58-
examples/Example_Zephyr/build/*
58+
examples/Zephyr/*/build/*

examples/Example_Zephyr/CMakeLists.txt renamed to examples/Zephyr/Example1_GetPositionAndTime_Zephyr/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ project(sparkfun_ublox_zephyr_library)
77

88
zephyr_compile_options(-fdiagnostics-color=always)
99

10-
zephyr_include_directories(../../src/)
11-
target_sources(app PRIVATE ../../src/SparkFun_Ublox_Zephyr_Library.cpp)
12-
target_sources(app PRIVATE ../../src/ublox_lib_interface.cpp)
10+
zephyr_include_directories(.)
11+
target_sources(app PRIVATE src/SparkFun_Ublox_Zephyr_Library.cpp)
12+
target_sources(app PRIVATE src/SparkFun_Ublox_Zephyr_Interface.cpp)
1313

1414
target_sources(app PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/main.c)

src/ublox_lib_interface.cpp renamed to examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/SparkFun_Ublox_Zephyr_Interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
This port was made by Vid Rajtmajer <vid@irnas.eu>, www.irnas.eu
66
*/
7-
#include "ublox_lib_interface.h"
7+
#include "SparkFun_Ublox_Zephyr_Interface.h"
88

99
#include <errno.h>
1010
#include <stdio.h>

examples/Example_Zephyr/src/main.c renamed to examples/Zephyr/Example1_GetPositionAndTime_Zephyr/src/main.c

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
/*
2-
Read NMEA sentences over I2C using Ublox module SAM-M8Q, NEO-M8P, ZED-F9P, etc
3-
By: Nathan Seidle
4-
SparkFun Electronics
5-
Date: August 22nd, 2018
6-
License: MIT. See license file for more information but you can
7-
basically do whatever you want with this code.
2+
Reading lat, long and UTC time via UBX binary commands
3+
By: Nathan Seidle
4+
SparkFun Electronics
5+
Date: August 22nd, 2018
6+
License: MIT. See license file for more information but you can
7+
basically do whatever you want with this code.
88
9-
This example reads the NMEA setences from the Ublox module over I2c and outputs
10-
them to the serial port
9+
This example reads the NMEA setences from the Ublox module over I2c and outputs
10+
them to the serial port
1111
12-
Open the serial monitor at 115200 baud to see the output
13-
I2C clock speed: 100 kHz
12+
Open the serial monitor at 115200 baud to see the output
13+
I2C clock speed: 100 kHz
1414
15-
Ported to Zephyr by Vid Rajtmajer <vid@irnas.eu>, www.irnas.eu
15+
Ported to Zephyr by Vid Rajtmajer <vid@irnas.eu>, www.irnas.eu
1616
17-
To build: west build -b <BOARD_NAME> -p
18-
To flash: west flash --erase
17+
Development environment specifics: NCS v1.0.3 release
18+
19+
To build: west build -b <BOARD_NAME> -p Can also read NMEA sentences over I2C with check_ublox function
20+
To flash: west flash --erase
1921
*/
2022
#include <device.h>
2123
#include <drivers/i2c.h>
2224
#include <errno.h>
2325
#include <zephyr.h>
2426
#include <zephyr/types.h>
2527

26-
#include "ublox_lib_interface.h"
28+
#include "SparkFun_Ublox_Zephyr_Interface.h"
2729

2830

2931
#define I2C_DEV "I2C_0"
@@ -74,7 +76,7 @@ uint8_t init_gps(void) {
7476

7577

7678
void main(void) {
77-
printk("Ublox Zephyr example\n");
79+
printk("Zephyr Ublox example\n");
7880

7981
int err;
8082
err = init_gpio();
@@ -92,9 +94,9 @@ void main(void) {
9294
}
9395

9496
while(1) {
95-
//check_ublox(); // See if new data is available. Process bytes as they come in.
97+
//check_ublox(); // See if new data is available. Process bytes as they come in.
9698
get_position();
9799
get_datetime();
98-
k_msleep(250); // Don't pound too hard on the I2C bus
100+
k_msleep(250); // Don't pound too hard on the I2C bus
99101
}
100102
}

0 commit comments

Comments
 (0)