-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from COVID-19-electronic-health-system/devel
Enables Bluetooth functionality
- Loading branch information
Showing
5 changed files
with
25 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <avr/io.h> | ||
#define CLKS 1000000 | ||
#define FOCS 2000000 | ||
#define BAUD 9600 | ||
#define MYUBRR ((CLKS/16*BAUD) - 1) | ||
|
||
#define MYUBRR FOCS/16/BAUD-1 | ||
void usartInit(unsigned int ubrr); | ||
void usartTransmit(unsigned char data); | ||
unsigned char usartReceive(void); | ||
int print(char c, FILE *stream); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
#include "driver/usart.h" | ||
#include "driver/led.h" | ||
|
||
static FILE mystdout = FDEV_SETUP_STREAM(print, NULL, _FDEV_SETUP_RW); | ||
|
||
int main(void) { | ||
ledInit(); | ||
while(1) { | ||
idle_blink(500); // Blinks PanFLUte's on-board LED | ||
usartInit(MYUBRR); | ||
stdout = &mystdout; | ||
while(1) { | ||
printf("%d\n", 21 + 79); | ||
delay_ms(1000); | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters