mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
The status line built the dotted quad by hand, which is what print_ip() from cmd_parser.c already does. Reusing it drops seven calls to one and takes 48 bytes off BANK2. The prototype is not __banked because cmd_parser.c and syslog.c are both in BANK2; a plain call is what the compiler needs here. Should either file move to another bank, this has to become __banked with it.
21 lines
500 B
C
21 lines
500 B
C
#ifndef _CMD_PARSER_H_
|
|
#define _CMD_PARSER_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "rtl837x_common.h"
|
|
|
|
extern __xdata uint8_t cmd_buffer[CMD_BUF_SIZE];
|
|
extern __xdata uint8_t cmd_available;
|
|
extern __xdata uint8_t err_status;
|
|
|
|
void cmd_tokenize(void) __banked;
|
|
void cmd_parser(void) __banked;
|
|
void execute_config(void) __banked;
|
|
void execute_commands(__xdata uint8_t *p) __banked;
|
|
void print_ip(__xdata uint8_t *ptr);
|
|
void print_sw_version(void) __banked;
|
|
void clear_command_history(void) __banked;
|
|
|
|
#endif
|