remote: Updated the naming in the remote protocol macros
This commit is contained in:
parent
adc03e47d6
commit
c271c5c979
|
@ -95,7 +95,7 @@ void remote_nrst_set_val(bool assert)
|
|||
uint8_t construct[REMOTE_MAX_MSG_SIZE];
|
||||
int s;
|
||||
|
||||
s = snprintf((char *)construct, REMOTE_MAX_MSG_SIZE, REMOTE_SRST_SET_STR,
|
||||
s = snprintf((char *)construct, REMOTE_MAX_MSG_SIZE, REMOTE_NRST_SET_STR,
|
||||
assert ? '1' : '0');
|
||||
platform_buffer_write(construct, s);
|
||||
|
||||
|
@ -114,7 +114,7 @@ bool remote_nrst_get_val(void)
|
|||
int s;
|
||||
|
||||
s = snprintf((char *)construct, REMOTE_MAX_MSG_SIZE,"%s",
|
||||
REMOTE_SRST_GET_STR);
|
||||
REMOTE_NRST_GET_STR);
|
||||
platform_buffer_write(construct, s);
|
||||
|
||||
s = platform_buffer_read(construct, REMOTE_MAX_MSG_SIZE);
|
||||
|
|
|
@ -277,12 +277,12 @@ static void remotePacketProcessGEN(unsigned i, char *packet)
|
|||
_respondS(REMOTE_RESP_OK,platform_target_voltage());
|
||||
break;
|
||||
|
||||
case REMOTE_SRST_SET:
|
||||
case REMOTE_NRST_SET:
|
||||
platform_nrst_set_val(packet[2] == '1');
|
||||
_respond(REMOTE_RESP_OK, 0);
|
||||
break;
|
||||
|
||||
case REMOTE_SRST_GET:
|
||||
case REMOTE_NRST_GET:
|
||||
_respond(REMOTE_RESP_OK, platform_nrst_get_val());
|
||||
break;
|
||||
case REMOTE_FREQ_SET:
|
||||
|
|
|
@ -78,8 +78,8 @@
|
|||
#define REMOTE_INIT 'S'
|
||||
#define REMOTE_TMS 'T'
|
||||
#define REMOTE_VOLTAGE 'V'
|
||||
#define REMOTE_SRST_SET 'Z'
|
||||
#define REMOTE_SRST_GET 'z'
|
||||
#define REMOTE_NRST_SET 'Z'
|
||||
#define REMOTE_NRST_GET 'z'
|
||||
#define REMOTE_ADD_JTAG_DEV 'J'
|
||||
|
||||
/* Protocol response options */
|
||||
|
@ -106,8 +106,8 @@
|
|||
|
||||
#define REMOTE_START_STR (char []){ '+', REMOTE_EOM, REMOTE_SOM, REMOTE_GEN_PACKET, REMOTE_START, REMOTE_EOM, 0 }
|
||||
#define REMOTE_VOLTAGE_STR (char []){ REMOTE_SOM, REMOTE_GEN_PACKET, REMOTE_VOLTAGE, REMOTE_EOM, 0 }
|
||||
#define REMOTE_SRST_SET_STR (char []){ REMOTE_SOM, REMOTE_GEN_PACKET, REMOTE_SRST_SET, '%', 'c', REMOTE_EOM, 0 }
|
||||
#define REMOTE_SRST_GET_STR (char []){ REMOTE_SOM, REMOTE_GEN_PACKET, REMOTE_SRST_GET, REMOTE_EOM, 0 }
|
||||
#define REMOTE_NRST_SET_STR (char []){ REMOTE_SOM, REMOTE_GEN_PACKET, REMOTE_NRST_SET, '%', 'c', REMOTE_EOM, 0 }
|
||||
#define REMOTE_NRST_GET_STR (char []){ REMOTE_SOM, REMOTE_GEN_PACKET, REMOTE_NRST_GET, REMOTE_EOM, 0 }
|
||||
#define REMOTE_FREQ_SET_STR (char []){ REMOTE_SOM, REMOTE_GEN_PACKET, REMOTE_FREQ_SET, '%', '0', '8', 'x', REMOTE_EOM, 0 }
|
||||
#define REMOTE_FREQ_GET_STR (char []){ REMOTE_SOM, REMOTE_GEN_PACKET, REMOTE_FREQ_GET, REMOTE_EOM, 0 }
|
||||
#define REMOTE_PWR_SET_STR (char []){ REMOTE_SOM, REMOTE_GEN_PACKET, REMOTE_PWR_SET, '%', 'c', REMOTE_EOM, 0 }
|
||||
|
|
Loading…
Reference in New Issue