Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
LoRaWAN benchmark
RIOT - IM880B
Commits
fc39198b
Commit
fc39198b
authored
Apr 17, 2019
by
Guillaume Gonnet
Browse files
Add implementation of stdio.
parent
52d44dc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
8 deletions
+46
-8
src/app/gps-stdio.c
src/app/gps-stdio.c
+46
-0
src/app/gps.c
src/app/gps.c
+0
-8
No files found.
src/app/gps-stdio.c
0 → 100644
View file @
fc39198b
/*
Implement stdio and fetch GPS data.
Copyright (C) 2019, ENSIMAG students
This project is under the MIT license
*/
#include <mutex.h>
#include <stdio.h>
typedef
struct
{
mutex_t
mutex
=
MUTEX_INIT
;
}
gps_isr_info_t
;
static
gps_isr_info_t
gps_isr_info
;
// Handle
static
void
gps_isr
(
gps_isr_info_t
*
info
,
char
c
)
{
mutex_unlock
(
&
info
->
mutex
);
}
// STDIN is disabled in our application.
ssize_t
stdio_read
(
void
*
buffer
,
size_t
count
)
{
return
0
;
}
// Write STDOUT data to serial port 0.
ssize_t
stdio_write
(
const
void
*
buffer
,
size_t
len
)
{
uart_write
(
STDIO_UART_DEV
,
(
const
uint8_t
*
)
buffer
,
len
);
return
len
;
}
// Initialize STDIO module.
void
stdio_init
(
void
)
{
uart_init
(
STDIO_UART_DEV
,
STDIO_UART_BAUDRATE
,
(
uart_rx_cb_t
)
gps_isr
,
&
gps_isr_info
);
}
src/app/gps.c
deleted
100644 → 0
View file @
52d44dc0
/*
Fetch GPS data.
Copyright (C) 2019, ENSIMAG students
This project is under the MIT license
*/
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment