feat support DMA for aiit-arm32-board and stm32f407-st-discovery uart function
This commit is contained in:
@@ -1642,14 +1642,12 @@ void shellTask(void *param)
|
||||
/* One input key from the the keyboard/uart may consist of mutliple characters (e.g., arrow keys). */
|
||||
char data[KEY_LENGTH];
|
||||
int i;
|
||||
int data_len;
|
||||
char data_len;
|
||||
|
||||
while(RET_TRUE)
|
||||
{
|
||||
if (shell->read && shell->read(data) == 0) {
|
||||
// KPrintf("in 1741 the char is: '%c' and ascii code is %d.\n\n",data,data);
|
||||
// KPrintf("the buffer is:'%s'\n\n",shell->parser.);
|
||||
data_len = strlen(data);
|
||||
if (shell->read) {
|
||||
data_len = shell->read(data);
|
||||
for (i = 0; i < data_len; i++) {
|
||||
shellHandler(shell, data[i]);
|
||||
}
|
||||
|
||||
@@ -46,13 +46,17 @@ void userShellWrite(char data)
|
||||
*/
|
||||
signed char userShellRead(char *data)
|
||||
{
|
||||
char read_length = 0;
|
||||
struct BusBlockReadParam read_param;
|
||||
read_param.read_length = 0;
|
||||
read_param.size = 1;
|
||||
read_param.buffer = data;
|
||||
|
||||
BusDevReadData(console, &read_param);
|
||||
|
||||
return 0;
|
||||
read_length = (char)read_param.read_length;
|
||||
|
||||
return read_length;
|
||||
}
|
||||
|
||||
#ifdef SHELL_ENABLE_FILESYSTEM
|
||||
@@ -107,7 +111,7 @@ int userShellInit(void)
|
||||
|
||||
/*Open the serial device in interrupt receiving and polling sending mode */
|
||||
struct SerialDevParam *serial_dev_param = (struct SerialDevParam *)console->private_data;
|
||||
serial_dev_param->serial_set_mode = SIGN_OPER_INT_RX;
|
||||
serial_dev_param->serial_set_mode = 0;
|
||||
serial_dev_param->serial_stream_mode = SIGN_OPER_STREAM;
|
||||
BusDevOpen(console);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user