/beta/Code Redesign killagreg/old_macros.h |
---|
File deleted |
/beta/Code Redesign killagreg/printf_P.c |
---|
File deleted |
/beta/Code Redesign killagreg/analog.c |
---|
57,7 → 57,6 |
#include "main.h" |
#include "timer0.h" |
#include "fc.h" |
#include "printf_P.h" |
#include "eeprom.h" |
#include "twimaster.h" |
#include "uart0.h" |
/beta/Code Redesign killagreg/eeprom.c |
---|
67,7 → 67,7 |
#include <avr/eeprom.h> |
#include <string.h> |
#include "eeprom.h" |
#include "printf_P.h" |
#include "uart0.h" |
#include "led.h" |
#include "main.h" |
#include "fc.h" |
/beta/Code Redesign killagreg/fc.c |
---|
60,7 → 60,6 |
#include "eeprom.h" |
#include "timer0.h" |
#include "analog.h" |
#include "printf_P.h" |
#include "fc.h" |
#include "uart0.h" |
#include "rc.h" |
/beta/Code Redesign killagreg/libfc.a |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/beta/Code Redesign killagreg/main.c |
---|
65,7 → 65,6 |
#include "fc.h" |
#include "rc.h" |
#include "analog.h" |
#include "printf_P.h" |
#ifdef USE_NAVICTRL |
#include "spi.h" |
#endif |
/beta/Code Redesign killagreg/makefile |
---|
109,7 → 109,7 |
########################################################################################################## |
# List C source files here. (C dependencies are automatically generated.) |
SRC = main.c uart0.c printf_P.c timer0.c timer2.c analog.c menu.c led.c |
SRC = main.c uart0.c timer0.c timer2.c analog.c menu.c led.c |
SRC += twimaster.c rc.c fc.c eeprom.c mymath.c spektrum.c |
ifeq ($(EXT), MK3MAG) |
/beta/Code Redesign killagreg/menu.c |
---|
70,6 → 70,12 |
uint8_t DispPtr = 0; |
void Menu_Putchar(char c) |
{ |
DisplayBuff[DispPtr++] = c; |
} |
void Menu_Clear(void) |
{ |
uint8_t i; |
/beta/Code Redesign killagreg/menu.h |
---|
2,15 → 2,20 |
#define _MENU_H |
#include <inttypes.h> |
#include "printf_P.h" |
#define DISPLAYBUFFSIZE 80 |
#define KEY1 0x01 |
#define KEY2 0x02 |
#define KEY3 0x04 |
#define KEY4 0x08 |
#define LCD_printfxy(x,y,format, args...) { DispPtr = y * 20 + x; _printf_P(Menu_Putchar,PSTR(format) , ## args);} |
#define LCD_printf(format, args...) { _printf_P(Menu_Putchar, PSTR(format) , ## args);} |
#define KEY1 0x01 |
#define KEY2 0x02 |
#define KEY3 0x04 |
#define KEY4 0x08 |
extern void Menu_Update(uint8_t Keys); |
extern void Menu_Putchar(char c); |
extern void Menu_Clear(void); |
extern int8_t DisplayBuff[DISPLAYBUFFSIZE]; |
/beta/Code Redesign killagreg/printf_P.h |
---|
3,17 → 3,9 |
#include <avr/pgmspace.h> |
#define OUT_V24 0 |
#define OUT_LCD 1 |
// function pointer to external callback put character function |
typedef void (*pVoidFnctChar) (char ); |
void _printf_P (pVoidFnctChar Putchar, char const *fmt0, ...); |
void _printf_P (char, char const *fmt0, ...); |
extern char PrintZiel; |
#define printf_P(format, args...) _printf_P(OUT_V24,format , ## args) |
#define printf(format, args...) _printf_P(OUT_V24,PSTR(format) , ## args) |
#define LCD_printfxy(x,y,format, args...) { DispPtr = y * 20 + x; _printf_P(OUT_LCD,PSTR(format) , ## args);} |
#define LCD_printf(format, args...) { _printf_P(OUT_LCD,PSTR(format) , ## args);} |
#endif |
#endif //_PRINTF_P_H_ |
/beta/Code Redesign killagreg/uart0.c |
---|
675,18 → 675,12 |
rxd_buffer_locked = FALSE; |
} |
//############################################################################ |
//Routine für die Serielle Ausgabe |
int16_t uart_putchar (int8_t c) |
//############################################################################ |
void USART0_Putchar (char c) |
{ |
if (c == '\n') |
uart_putchar('\r'); |
// wait until previous character was send |
loop_until_bit_is_set(UCSR0A, UDRE0); |
// send character |
UDR0 = c; |
return (0); |
} |
/beta/Code Redesign killagreg/uart0.h |
---|
1,6 → 1,8 |
#ifndef _UART0_H |
#define _UART0_H |
#include "printf_P.h" |
// must be at least 4('#'+Addr+'CmdID'+'\r')+ (80 * 4)/3 = 111 bytes |
#define TXD_BUFFER_LEN 160 |
#define RXD_BUFFER_LEN 160 |
14,8 → 16,12 |
extern void USART0_Init (void); |
extern void USART0_TransmitTxData(void); |
extern void USART0_ProcessRxData(void); |
extern int16_t uart_putchar(int8_t c); |
extern void USART0_Putchar(char c); |
#define printf_P(format, args...) _printf_P(USART0_Putchar, format , ## args) |
#define printf(format, args...) _printf_P(USART0_Putchar, PSTR(format) , ## args) |
extern uint8_t PcAccess; |
extern uint8_t RemotePollDisplayLine; |