void serial_puts (const char *);
int serial_getc (void);
int serial_tstc (void);
+void serial_setbrg (void);
void _serial_putc (const char, const int);
void _serial_putc_raw(const char, const int);
defined(CONFIG_FOR_MESH_POTATO_V2)
#define CFG_LOAD_ADDR 0x9F040000
#define UPDATE_SCRIPT_FW_ADDR "0x9F040000"
+
+ /* FOR NEW UART DRIVER TESTS ONLY! */
+ #undef CFG_BAUDRATE_TABLE
+ #define CFG_BAUDRATE_TABLE { 9600, 14400, 19200, 28800, 38400, 56000, 57600, 115200, 128000, 230400, 256000, 460800, 921600 }
#else
#define CFG_LOAD_ADDR 0x9F020000
#define UPDATE_SCRIPT_FW_ADDR "0x9F020000"
}
static int init_baudrate(void){
- gd->baudrate = CONFIG_BAUDRATE;
+ char *s;
+
+ if((s = getenv("baudrate")) != NULL){
+ gd->baudrate = simple_strtoul(s, NULL, 10);
+ } else {
+ gd->baudrate = CONFIG_BAUDRATE;
+ }
return(0);
}