Created
October 20, 2015 17:32
-
-
Save miek/ba5ce17e9d194dc75a78 to your computer and use it in GitHub Desktop.
nrf51 retarget
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
#include "retarget.h" | |
#include "simple_uart.h" | |
int _write(int fd, char * str, int len) | |
{ | |
for (int i = 0; i < len; i++) | |
{ | |
simple_uart_put(str[i]); | |
} | |
return len; | |
} | |
void retarget_init(void) | |
{ | |
simple_uart_config(8, 7, 10, 30, false); | |
} |
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
#ifndef __RETARGET_H_ | |
#define __RETARGET_H_ | |
void retarget_init(void); | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment