mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Merge branch 'logicog:main' into syslog
This commit is contained in:
@@ -201,6 +201,7 @@ uint8_t atoi_byte(__xdata uint8_t *out, uint8_t idx)
|
|||||||
uint8_t atoi_short(__xdata uint16_t *vlan, uint8_t idx)
|
uint8_t atoi_short(__xdata uint16_t *vlan, uint8_t idx)
|
||||||
{
|
{
|
||||||
uint8_t err = 1;
|
uint8_t err = 1;
|
||||||
|
*vlan = 0;
|
||||||
|
|
||||||
while (isnumber(cmd_buffer[idx])) {
|
while (isnumber(cmd_buffer[idx])) {
|
||||||
err = 0;
|
err = 0;
|
||||||
@@ -1191,6 +1192,7 @@ err:
|
|||||||
// Parse command into words
|
// Parse command into words
|
||||||
// cmd_words_len contains the number of words found.
|
// cmd_words_len contains the number of words found.
|
||||||
// cmd_words_b[] contains only start of a word offset.
|
// cmd_words_b[] contains only start of a word offset.
|
||||||
|
// Returns the parsing status via `err_status`-variable.
|
||||||
void cmd_tokenize(void) __banked
|
void cmd_tokenize(void) __banked
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
extern __xdata uint8_t cmd_buffer[CMD_BUF_SIZE];
|
extern __xdata uint8_t cmd_buffer[CMD_BUF_SIZE];
|
||||||
extern __xdata uint8_t cmd_available;
|
extern __xdata uint8_t cmd_available;
|
||||||
|
|
||||||
uint8_t cmd_tokenize(void) __banked;
|
void cmd_tokenize(void) __banked;
|
||||||
void cmd_parser(void) __banked;
|
void cmd_parser(void) __banked;
|
||||||
void execute_config(void) __banked;
|
void execute_config(void) __banked;
|
||||||
void print_sw_version(void) __banked;
|
void print_sw_version(void) __banked;
|
||||||
|
|||||||
+3
-1
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
extern __code const struct machine machine;
|
extern __code const struct machine machine;
|
||||||
extern __xdata uint32_t flash_size;
|
extern __xdata uint32_t flash_size;
|
||||||
|
extern __xdata uint8_t err_status;
|
||||||
|
|
||||||
extern __xdata uint16_t crc_value;
|
extern __xdata uint16_t crc_value;
|
||||||
__xdata struct machine_runtime machine_detected;
|
__xdata struct machine_runtime machine_detected;
|
||||||
@@ -1330,7 +1331,8 @@ void idle(void)
|
|||||||
// Check whether a command is waiting in the cmd_buffer and execute
|
// Check whether a command is waiting in the cmd_buffer and execute
|
||||||
if (cmd_available) {
|
if (cmd_available) {
|
||||||
cmd_available = 0;
|
cmd_available = 0;
|
||||||
if (!cmd_tokenize())
|
cmd_tokenize();
|
||||||
|
if (err_status == ERR_OK)
|
||||||
cmd_parser();
|
cmd_parser();
|
||||||
print_cmd_prompt();
|
print_cmd_prompt();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user