buggy revision warning

This commit is contained in:
bg 2009-07-29 14:57:10 +00:00
parent cccb1d3e00
commit a5cb349f9d
7 changed files with 55 additions and 56 deletions

15
WARNING-BUGGY-VERSION Normal file
View File

@ -0,0 +1,15 @@
The current version of the AVR-Crypto-Lib is BUGGY
====================================================
This is due to our afford of integrating newly optimized versions of the
UART interface and the cli tools.
We are working on this problem.
Please use a revision prior to 2009-07-28.
This means use
svn revisions up to revision 2832 and
bzr revisions up to revision 67
best regards,
Daniel Otte

View File

@ -277,6 +277,9 @@ cli_option_listing:
call strlen
sbiw r24, 1
movw LEN_0, r24
brpl 1f
clr LEN_0
clr LEN_1
1:
movw r30, LST_0
lpm r24, Z+

View File

@ -38,52 +38,14 @@
cli_rx_fpt cli_rx = NULL;
cli_tx_fpt cli_tx = NULL;
uint8_t cli_echo=1;
uint8_t cli_echo = 1;
void echo_ctrl(char* s);
void echo_ctrl(char* s);
uint16_t max_cmd_length(PGM_VOID_P cmdlist);
int8_t search_and_call(char* cmd, uint16_t maxcmdlength, PGM_VOID_P cmdlist);
void cli_option_listing(char* buffer, PGM_VOID_P cmdlist);
int8_t search_and_call(char* cmd, uint16_t maxcmdlength, PGM_VOID_P cmdlist);
void cli_option_listing(char* buffer, PGM_VOID_P cmdlist);
void cli_auto_help(uint16_t maxcmdlength, PGM_VOID_P cmdlist);
void cli_auto_help(uint16_t maxcmdlength, PGM_VOID_P cmdlist);/*
{
cmdlist_entry_t item;
uint16_t i;
if(!cli_tx)
return;
cli_putstr_P(PSTR("\r\n[auto help] available commands:\r\n"
" <command> - <params> - <address>\r\n"));
for(;;){
item.cmd_name = (void*)pgm_read_word(cmdlist+0);
item.cmd_param_str = (void*)pgm_read_word(cmdlist+2);
item.cmd_function = (void_fpt)pgm_read_word(cmdlist+4);
cmdlist = (uint8_t*)cmdlist+CMDLIST_ENTRY_SIZE;
if(item.cmd_name==NULL){
return;
}
cli_tx(' ');
cli_putstr_P(item.cmd_name);
i=maxcmdlength-strlen_P(item.cmd_name);
while(i--)
cli_tx(' ');
cli_putstr_P(PSTR(" - "));
if(item.cmd_param_str==NULL){
cli_putstr_P(PSTR("none \t- 0x"));
} else {
if(item.cmd_param_str==(void*)1){
cli_putstr_P(PSTR("yes \t- 0x"));
} else {
cli_putstr_P(item.cmd_param_str);
cli_putstr_P(PSTR(" \t- 0x"));
}
}
cli_hexdump_rev(&item.cmd_function, 2);
cli_putstr_P(PSTR("\r\n"));
}
}
*/
typedef void(*str_fpt)(char*);
#define CLI_ENTER 13
#define CLI_BACKSPACE 8

View File

@ -52,10 +52,7 @@ void nessie_send_alive_a(uint16_t i);
#define NESSIE_PUTSTR cli_putstr
#define NESSIE_PUTSTR_P cli_putstr_P
#else
#include "uart.h"
#define NESSIE_PUTC uart_putc
#define NESSIE_PUTSTR uart_putstr
#define NESSIE_PUTSTR_P uart_putstr_P
# error "direct uart output removed for nessie"
#endif
void nessie_print_block(uint8_t* block, uint16_t blocksize_bit);

View File

@ -22,11 +22,11 @@
*/
#ifndef F_CPU
# error "uart_ni requires F_CPU to be defined"
# error "uart_i requires F_CPU to be defined"
#endif
#ifndef BAUD
# error "uart_ni requires UART0_BAUD_RATE to be defined"
# error "uart_i requires UART0_BAUD_RATE to be defined"
#endif
#if !(F_CPU)

View File

@ -46,9 +46,9 @@ stridentcnt_P:
ld r22, X+
lpm r23, Z+
cpse r22, r23
ret
cpse r22, r1
ret
2: ret
tst r22
breq 2b
adiw r24, 1
rjmp 1b

View File

@ -29,10 +29,28 @@
#include <avr/io.h>
#include "config.h"
#include "avr-asm-macros.S"
#include "uart_defs.h"
#define XON_VALUE 0x11
#define XOFF_VALUE 0x13
#if UART0_I
#ifndef UART0_PARATY
# warning "UART0: using default paraty: 'none'"
# define UART0_PARATY UART_PARATY_NONE
#endif
#ifndef UART0_STOPBITS
# warning "UART0: using default ammount of stop bits: '1'"
# define UART0_STOPBITS UART_STOPBITS_1
#endif
#ifndef UART0_DATABITS
# warning "UART0: using default ammount of data bits: '8'"
# define UART0_DATABITS UART_DATABITS_8
#endif
#ifdef UDR
# define OLD_UART
# ifdef UDR0
@ -310,8 +328,9 @@ uart0_putc:
*/
.global USART0_RX_vect
USART0_RX_vect:
push_range 0, 1
push_range 16, 31
in r21, _SFR_IO_ADDR(SREG)
in r18, _SFR_IO_ADDR(SREG)
LOAD_IO r24, UDR0
#if UART0_SWFLOWCTRL
ldi r26, lo8(uart0_ctx+UART0_TXON_OFFSET)
@ -368,8 +387,8 @@ uart0_putc:
ldi r23, hi8(uart0_ctx+UART0_CBB_TX_OFFSET)
ldi r30, lo8(uart0_ctx+UART0_RXON_OFFSET)
ldi r31, hi8(uart0_ctx+UART0_RXON_OFFSET)
ld r21, Z
tst r21
ld r16, Z
tst r16
breq 60f
cpi r24, UART0_THRESH_HIGH+1
brlo 99f
@ -387,8 +406,9 @@ uart0_putc:
SET_BIT_IO UCSR0B, UDRIE0, r24
#endif /* UART0_SWFLOWCTRL */
99:
out _SFR_IO_ADDR(SREG), r21
out _SFR_IO_ADDR(SREG), r18
pop_range 16, 31
pop_range 0, 1
reti
/******************************************************************************/
@ -415,6 +435,7 @@ uart0_putc:
movw r24, r22
cli
rcall circularbytebuffer_get_fifo
clr r25
reti
/******************************************************************************/
@ -445,3 +466,4 @@ uart0_sethook:
ret
#endif
#endif /* UART0_I */