Skip to content

Instantly share code, notes, and snippets.

@miek
Created October 20, 2015 17:32
Show Gist options
  • Save miek/ba5ce17e9d194dc75a78 to your computer and use it in GitHub Desktop.
Save miek/ba5ce17e9d194dc75a78 to your computer and use it in GitHub Desktop.
nrf51 retarget
#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);
}
#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