From c271c5c979f7d9776227cb41e6796ffb104102ad Mon Sep 17 00:00:00 2001 From: dragonmux Date: Wed, 15 Jun 2022 21:57:03 -0400 Subject: [PATCH] remote: Updated the naming in the remote protocol macros --- src/platforms/hosted/bmp_remote.c | 4 ++-- src/remote.c | 4 ++-- src/remote.h | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/platforms/hosted/bmp_remote.c b/src/platforms/hosted/bmp_remote.c index 0423ed4..7b01341 100644 --- a/src/platforms/hosted/bmp_remote.c +++ b/src/platforms/hosted/bmp_remote.c @@ -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); diff --git a/src/remote.c b/src/remote.c index 97e3115..056cbc0 100644 --- a/src/remote.c +++ b/src/remote.c @@ -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: diff --git a/src/remote.h b/src/remote.h index a281d16..e1d9a54 100644 --- a/src/remote.h +++ b/src/remote.h @@ -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 }