summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2019-09-15 17:09:26 -0700
committerKeith Packard <keithp@keithp.com>2019-09-15 17:09:26 -0700
commit99525a748e00406424b98a0952f0156437b30b6c (patch)
treec71afba2173632314441f89325594774d6123d70 /src
parent46d3cbadce6808b4cd29ad1e034efac7b5e4fa42 (diff)
altos: Replace ao_xmem functions with direct mem calls
We no longer need to wrap these functions Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/ao_25lc1024.c6
-rw-r--r--src/drivers/ao_at45db161d.c6
-rw-r--r--src/drivers/ao_gps_skytraq.c4
-rw-r--r--src/drivers/ao_packet.c8
-rw-r--r--src/drivers/ao_packet_master.c2
-rw-r--r--src/drivers/ao_packet_slave.c2
-rw-r--r--src/drivers/ao_radio_master.c8
-rw-r--r--src/drivers/ao_radio_slave.c2
-rw-r--r--src/kernel/ao.h6
-rw-r--r--src/kernel/ao_config.c12
-rw-r--r--src/kernel/ao_ee_fake.c2
-rw-r--r--src/kernel/ao_gps_report.c4
-rw-r--r--src/kernel/ao_gps_report_mega.c4
-rw-r--r--src/kernel/ao_gps_report_metrum.c4
-rw-r--r--src/kernel/ao_host.h6
-rw-r--r--src/kernel/ao_log_telem.c2
-rw-r--r--src/kernel/ao_monitor.c2
-rw-r--r--src/kernel/ao_radio_cmac.c4
-rw-r--r--src/kernel/ao_telemetry.c34
-rw-r--r--src/product/ao_terraui.c6
-rw-r--r--src/test/ao_flight_test.c7
21 files changed, 65 insertions, 66 deletions
diff --git a/src/drivers/ao_25lc1024.c b/src/drivers/ao_25lc1024.c
index c73f54df..2139dadc 100644
--- a/src/drivers/ao_25lc1024.c
+++ b/src/drivers/ao_25lc1024.c
@@ -169,7 +169,7 @@ ao_storage_device_write(uint32_t pos, void *buf, uint16_t len)
ao_ee_flush_internal();
ao_ee_block = block;
}
- ao_xmemcpy(ao_ee_data + (uint16_t) (pos & 0xff), buf, len);
+ memcpy(ao_ee_data + (uint16_t) (pos & 0xff), buf, len);
ao_ee_block_dirty = 1;
} ao_mutex_put(&ao_ee_mutex);
return 1;
@@ -183,7 +183,7 @@ ao_storage_device_read(uint32_t pos, void *buf, uint16_t len)
/* Transfer the data */
ao_mutex_get(&ao_ee_mutex); {
ao_ee_fill(block);
- ao_xmemcpy(buf, ao_ee_data + (uint16_t) (pos & 0xff), len);
+ memcpy(buf, ao_ee_data + (uint16_t) (pos & 0xff), len);
} ao_mutex_put(&ao_ee_mutex);
return 1;
}
@@ -202,7 +202,7 @@ ao_storage_erase(uint32_t pos)
ao_mutex_get(&ao_ee_mutex); {
ao_ee_flush_internal();
ao_ee_block = (uint16_t) (pos >> EE_BLOCK_SHIFT);
- ao_xmemset(ao_ee_data, 0xff, EE_BLOCK_SIZE);
+ memset(ao_ee_data, 0xff, EE_BLOCK_SIZE);
ao_ee_block_dirty = 1;
} ao_mutex_put(&ao_ee_mutex);
return 1;
diff --git a/src/drivers/ao_at45db161d.c b/src/drivers/ao_at45db161d.c
index 516811b8..e04baaf6 100644
--- a/src/drivers/ao_at45db161d.c
+++ b/src/drivers/ao_at45db161d.c
@@ -246,7 +246,7 @@ ao_storage_device_write(uint32_t pos, void *buf, uint16_t len)
ao_flash_flush_internal();
ao_flash_block = block;
}
- ao_xmemcpy(ao_flash_data + (uint16_t) (pos & ao_flash_block_mask),
+ memcpy(ao_flash_data + (uint16_t) (pos & ao_flash_block_mask),
buf,
len);
ao_flash_block_dirty = 1;
@@ -262,7 +262,7 @@ ao_storage_device_read(uint32_t pos, void *buf, uint16_t len)
/* Transfer the data */
ao_mutex_get(&ao_flash_mutex); {
ao_flash_fill(block);
- ao_xmemcpy(buf,
+ memcpy(buf,
ao_flash_data + (uint16_t) (pos & ao_flash_block_mask),
len);
} ao_mutex_put(&ao_flash_mutex);
@@ -283,7 +283,7 @@ ao_storage_erase(uint32_t pos)
ao_mutex_get(&ao_flash_mutex); {
ao_flash_flush_internal();
ao_flash_block = (uint16_t) (pos >> ao_flash_block_shift);
- ao_xmemset(ao_flash_data, 0xff, ao_flash_block_size);
+ memset(ao_flash_data, 0xff, ao_flash_block_size);
ao_flash_block_dirty = 1;
} ao_mutex_put(&ao_flash_mutex);
return 1;
diff --git a/src/drivers/ao_gps_skytraq.c b/src/drivers/ao_gps_skytraq.c
index f767118a..3b4a62ec 100644
--- a/src/drivers/ao_gps_skytraq.c
+++ b/src/drivers/ao_gps_skytraq.c
@@ -298,7 +298,7 @@ ao_nmea_gga(void)
ao_mutex_get(&ao_gps_mutex);
ao_gps_new |= AO_GPS_NEW_DATA;
ao_gps_tick = ao_gps_next_tick;
- ao_xmemcpy(&ao_gps_data, &ao_gps_next, sizeof (ao_gps_data));
+ memcpy(&ao_gps_data, &ao_gps_next, sizeof (ao_gps_data));
ao_mutex_put(&ao_gps_mutex);
ao_wakeup(&ao_gps_new);
}
@@ -357,7 +357,7 @@ ao_nmea_gsv(void)
else if (done) {
ao_mutex_get(&ao_gps_mutex);
ao_gps_new |= AO_GPS_NEW_TRACKING;
- ao_xmemcpy(&ao_gps_tracking_data, &ao_gps_tracking_next, sizeof(ao_gps_tracking_data));
+ memcpy(&ao_gps_tracking_data, &ao_gps_tracking_next, sizeof(ao_gps_tracking_data));
ao_mutex_put(&ao_gps_mutex);
ao_wakeup(&ao_gps_new);
}
diff --git a/src/drivers/ao_packet.c b/src/drivers/ao_packet.c
index b5a0a4b7..b9331c4d 100644
--- a/src/drivers/ao_packet.c
+++ b/src/drivers/ao_packet.c
@@ -42,7 +42,7 @@ ao_packet_send(void)
#endif
/* If any tx data is pending then copy it into the tx packet */
if (ao_packet_tx_used && ao_tx_packet.len == 0) {
- ao_xmemcpy(&ao_tx_packet.d, tx_data, ao_packet_tx_used);
+ memcpy(&ao_tx_packet.d, tx_data, ao_packet_tx_used);
ao_tx_packet.len = ao_packet_tx_used;
ao_tx_packet.seq++;
ao_packet_tx_used = 0;
@@ -88,10 +88,10 @@ ao_packet_recv(uint16_t timeout)
/* Accept packets with matching call signs, or any packet if
* our callsign hasn't been configured
*/
- if (ao_xmemcmp(ao_rx_packet.packet.callsign,
+ if (memcmp(ao_rx_packet.packet.callsign,
ao_config.callsign,
AO_MAX_CALLSIGN) != 0 &&
- ao_xmemcmp(ao_config.callsign, "N0CALL", 7) != 0)
+ memcmp(ao_config.callsign, "N0CALL", 7) != 0)
return 0;
/* SYN packets carry no data */
@@ -111,7 +111,7 @@ ao_packet_recv(uint16_t timeout)
/* Copy data to the receive data buffer and set up the
* offsets
*/
- ao_xmemcpy(rx_data, ao_rx_packet.packet.d, ao_rx_packet.packet.len);
+ memcpy(rx_data, ao_rx_packet.packet.d, ao_rx_packet.packet.len);
ao_packet_rx_used = 0;
ao_packet_rx_len = ao_rx_packet.packet.len;
diff --git a/src/drivers/ao_packet_master.c b/src/drivers/ao_packet_master.c
index e67dd27f..a44b34cf 100644
--- a/src/drivers/ao_packet_master.c
+++ b/src/drivers/ao_packet_master.c
@@ -93,7 +93,7 @@ ao_packet_master(void)
ao_packet_master_delay = AO_PACKET_MASTER_DELAY_SHORT;
while (ao_packet_enable) {
uint8_t r;
- ao_xmemcpy(ao_tx_packet.callsign, ao_config.callsign, AO_MAX_CALLSIGN);
+ memcpy(ao_tx_packet.callsign, ao_config.callsign, AO_MAX_CALLSIGN);
ao_packet_send();
if (ao_tx_packet.len)
ao_packet_master_busy();
diff --git a/src/drivers/ao_packet_slave.c b/src/drivers/ao_packet_slave.c
index a5834799..314ce14a 100644
--- a/src/drivers/ao_packet_slave.c
+++ b/src/drivers/ao_packet_slave.c
@@ -26,7 +26,7 @@ ao_packet_slave(void)
ao_packet_restart = 1;
while (ao_packet_enable) {
if (ao_packet_recv(0)) {
- ao_xmemcpy(&ao_tx_packet.callsign, &ao_rx_packet.packet.callsign, AO_MAX_CALLSIGN);
+ memcpy(&ao_tx_packet.callsign, &ao_rx_packet.packet.callsign, AO_MAX_CALLSIGN);
#if HAS_FLIGHT
ao_flight_force_idle = true;
#endif
diff --git a/src/drivers/ao_radio_master.c b/src/drivers/ao_radio_master.c
index 8b62a4de..b229bd6f 100644
--- a/src/drivers/ao_radio_master.c
+++ b/src/drivers/ao_radio_master.c
@@ -134,7 +134,7 @@ ao_radio_get_data(void *d, uint8_t size)
AO_RADIO_SPI_REPLY_HEADER_LEN + size,
AO_RADIO_SPI_BUS);
ao_radio_master_stop();
- ao_xmemcpy(d, ao_radio_spi_reply.payload, size);
+ memcpy(d, ao_radio_spi_reply.payload, size);
PRINTD ("fetched %d\n", size);
}
@@ -150,7 +150,7 @@ void
ao_radio_send(const void *d, uint8_t size)
{
ao_radio_get(AO_RADIO_SPI_SEND, size);
- ao_xmemcpy(&ao_radio_spi_request.payload, d, size);
+ memcpy(&ao_radio_spi_request.payload, d, size);
ao_radio_master_send();
ao_radio_put();
}
@@ -190,7 +190,7 @@ ao_radio_cmac_set_key(void)
*/
PRINTD ("set key\n");
ao_radio_get(AO_RADIO_SPI_CMAC_KEY, AO_AES_LEN);
- ao_xmemcpy(&ao_radio_spi_request.payload, &ao_config.aes_key, AO_AES_LEN);
+ memcpy(&ao_radio_spi_request.payload, &ao_config.aes_key, AO_AES_LEN);
ao_radio_master_send();
ao_radio_put();
PRINTD ("key set\n");
@@ -212,7 +212,7 @@ ao_radio_cmac_send(void *packet, uint8_t len)
PRINTD ("sending packet\n");
ao_radio_get(AO_RADIO_SPI_CMAC_SEND, len);
- ao_xmemcpy(&ao_radio_spi_request.payload, packet, len);
+ memcpy(&ao_radio_spi_request.payload, packet, len);
ao_radio_master_send();
ao_radio_put();
PRINTD ("packet sent\n");
diff --git a/src/drivers/ao_radio_slave.c b/src/drivers/ao_radio_slave.c
index 7859d6b6..e0470934 100644
--- a/src/drivers/ao_radio_slave.c
+++ b/src/drivers/ao_radio_slave.c
@@ -107,7 +107,7 @@ ao_radio_slave_spi(void)
break;
case AO_RADIO_SPI_CMAC_KEY:
- ao_xmemcpy(&ao_config.aes_key, ao_radio_spi_request.payload, AO_AES_LEN);
+ memcpy(&ao_config.aes_key, ao_radio_spi_request.payload, AO_AES_LEN);
break;
case AO_RADIO_SPI_TEST_ON:
diff --git a/src/kernel/ao.h b/src/kernel/ao.h
index dddcd9cb..21ab2747 100644
--- a/src/kernel/ao.h
+++ b/src/kernel/ao.h
@@ -937,12 +937,6 @@ ao_log_single(void);
#define AO_TELEPYRO_NUM_ADC 9
-#ifndef ao_xmemcpy
-#define ao_xmemcpy(d,s,c) memcpy(d,s,c)
-#define ao_xmemset(d,v,c) memset(d,v,c)
-#define ao_xmemcmp(d,s,c) memcmp(d,s,c)
-#endif
-
/*
* ao_terraui.c
*/
diff --git a/src/kernel/ao_config.c b/src/kernel/ao_config.c
index f7c79e7d..9f329f17 100644
--- a/src/kernel/ao_config.c
+++ b/src/kernel/ao_config.c
@@ -138,8 +138,8 @@ _ao_config_get(void)
/* Version 0 stuff */
ao_config.main_deploy = AO_CONFIG_DEFAULT_MAIN_DEPLOY;
- ao_xmemset(&ao_config.callsign, '\0', sizeof (ao_config.callsign));
- ao_xmemcpy(&ao_config.callsign, AO_CONFIG_DEFAULT_CALLSIGN,
+ memset(&ao_config.callsign, '\0', sizeof (ao_config.callsign));
+ memcpy(&ao_config.callsign, AO_CONFIG_DEFAULT_CALLSIGN,
sizeof(AO_CONFIG_DEFAULT_CALLSIGN) - 1);
ao_config._legacy_radio_channel = 0;
}
@@ -171,7 +171,7 @@ _ao_config_get(void)
if (minor < 8)
ao_config.radio_enable = AO_RADIO_ENABLE_CORE;
if (minor < 9)
- ao_xmemset(&ao_config.aes_key, '\0', AO_AES_LEN);
+ memset(&ao_config.aes_key, '\0', AO_AES_LEN);
if (minor < 10)
ao_config.frequency = 434550 + ao_config._legacy_radio_channel * 100;
if (minor < 11)
@@ -250,7 +250,7 @@ _ao_config_get(void)
#if HAS_RADIO_RATE
ao_config.radio_rate = AO_CONFIG_DEFAULT_RADIO_RATE;
#endif
- ao_xmemcpy(&ao_config.callsign, AO_CONFIG_DEFAULT_CALLSIGN,
+ memcpy(&ao_config.callsign, AO_CONFIG_DEFAULT_CALLSIGN,
sizeof(AO_CONFIG_DEFAULT_CALLSIGN) - 1);
}
#endif
@@ -294,7 +294,7 @@ ao_config_callsign_set(void)
uint8_t c;
static char callsign[AO_MAX_CALLSIGN + 1];
- ao_xmemset(callsign, '\0', sizeof callsign);
+ memset(callsign, '\0', sizeof callsign);
ao_cmd_white();
c = 0;
while (ao_cmd_lex_c != '\n') {
@@ -307,7 +307,7 @@ ao_config_callsign_set(void)
if (ao_cmd_status != ao_cmd_success)
return;
_ao_config_edit_start();
- ao_xmemcpy(&ao_config.callsign, &callsign,
+ memcpy(&ao_config.callsign, &callsign,
AO_MAX_CALLSIGN + 1);
_ao_config_edit_finish();
}
diff --git a/src/kernel/ao_ee_fake.c b/src/kernel/ao_ee_fake.c
index cef0a438..f5e195ad 100644
--- a/src/kernel/ao_ee_fake.c
+++ b/src/kernel/ao_ee_fake.c
@@ -33,6 +33,6 @@ ao_ee_write_config(uint8_t *buf, uint16_t len)
uint8_t
ao_ee_read_config(uint8_t *buf, uint16_t len)
{
- ao_xmemset(buf, '\0', len);
+ memset(buf, '\0', len);
return 1;
}
diff --git a/src/kernel/ao_gps_report.c b/src/kernel/ao_gps_report.c
index 0ef9a725..01226ba5 100644
--- a/src/kernel/ao_gps_report.c
+++ b/src/kernel/ao_gps_report.c
@@ -32,9 +32,9 @@ ao_gps_report(void)
ao_sleep(&ao_gps_new);
ao_mutex_get(&ao_gps_mutex);
if (new & AO_GPS_NEW_DATA)
- ao_xmemcpy(&gps_data, &ao_gps_data, sizeof (ao_gps_data));
+ memcpy(&gps_data, &ao_gps_data, sizeof (ao_gps_data));
if (new & AO_GPS_NEW_TRACKING)
- ao_xmemcpy(&gps_tracking_data, &ao_gps_tracking_data, sizeof (ao_gps_tracking_data));
+ memcpy(&gps_tracking_data, &ao_gps_tracking_data, sizeof (ao_gps_tracking_data));
ao_gps_new = 0;
ao_mutex_put(&ao_gps_mutex);
diff --git a/src/kernel/ao_gps_report_mega.c b/src/kernel/ao_gps_report_mega.c
index 37f1beaa..0cba972b 100644
--- a/src/kernel/ao_gps_report_mega.c
+++ b/src/kernel/ao_gps_report_mega.c
@@ -70,9 +70,9 @@ ao_gps_report_mega(void)
ao_sleep(&ao_gps_new);
ao_mutex_get(&ao_gps_mutex);
if (new & AO_GPS_NEW_DATA)
- ao_xmemcpy(&gps_data, &ao_gps_data, sizeof (ao_gps_data));
+ memcpy(&gps_data, &ao_gps_data, sizeof (ao_gps_data));
if (new & AO_GPS_NEW_TRACKING)
- ao_xmemcpy(&gps_tracking_data, &ao_gps_tracking_data, sizeof (ao_gps_tracking_data));
+ memcpy(&gps_tracking_data, &ao_gps_tracking_data, sizeof (ao_gps_tracking_data));
ao_gps_new = 0;
ao_mutex_put(&ao_gps_mutex);
diff --git a/src/kernel/ao_gps_report_metrum.c b/src/kernel/ao_gps_report_metrum.c
index e5839b36..b5f58893 100644
--- a/src/kernel/ao_gps_report_metrum.c
+++ b/src/kernel/ao_gps_report_metrum.c
@@ -34,9 +34,9 @@ ao_gps_report_metrum(void)
ao_sleep(&ao_gps_new);
ao_mutex_get(&ao_gps_mutex);
if (new & AO_GPS_NEW_DATA)
- ao_xmemcpy(&gps_data, &ao_gps_data, sizeof (ao_gps_data));
+ memcpy(&gps_data, &ao_gps_data, sizeof (ao_gps_data));
if (new & AO_GPS_NEW_TRACKING)
- ao_xmemcpy(&gps_tracking_data, &ao_gps_tracking_data, sizeof (ao_gps_tracking_data));
+ memcpy(&gps_tracking_data, &ao_gps_tracking_data, sizeof (ao_gps_tracking_data));
ao_gps_new = 0;
ao_mutex_put(&ao_gps_mutex);
diff --git a/src/kernel/ao_host.h b/src/kernel/ao_host.h
index 592de54c..f3221822 100644
--- a/src/kernel/ao_host.h
+++ b/src/kernel/ao_host.h
@@ -127,6 +127,6 @@ struct ao_config {
struct ao_config ao_config = { 250, 16000 };
-#define ao_xmemcpy(d,s,c) memcpy(d,s,c)
-#define ao_xmemset(d,v,c) memset(d,v,c)
-#define ao_xmemcmp(d,s,c) memcmp(d,s,c)
+#define memcpy(d,s,c) memcpy(d,s,c)
+#define memset(d,v,c) memset(d,v,c)
+#define memcmp(d,s,c) memcmp(d,s,c)
diff --git a/src/kernel/ao_log_telem.c b/src/kernel/ao_log_telem.c
index 8c0b88e4..f985417a 100644
--- a/src/kernel/ao_log_telem.c
+++ b/src/kernel/ao_log_telem.c
@@ -103,7 +103,7 @@ ao_log_single(void)
while (ao_log_running) {
/* Write samples to EEPROM */
while (ao_log_monitor_pos != ao_monitor_head) {
- ao_xmemcpy(&ao_log_single_write_data.telemetry,
+ memcpy(&ao_log_single_write_data.telemetry,
&ao_monitor_ring[ao_log_monitor_pos],
AO_LOG_SINGLE_SIZE);
ao_log_single_write();
diff --git a/src/kernel/ao_monitor.c b/src/kernel/ao_monitor.c
index 400ae4df..cd511699 100644
--- a/src/kernel/ao_monitor.c
+++ b/src/kernel/ao_monitor.c
@@ -157,7 +157,7 @@ ao_monitor_put(void)
state = recv_orig.telemetry_orig.flight_state;
rssi = (int16_t) AO_RSSI_FROM_RADIO(recv_orig.rssi);
- ao_xmemcpy(callsign, recv_orig.telemetry_orig.callsign, AO_MAX_CALLSIGN);
+ memcpy(callsign, recv_orig.telemetry_orig.callsign, AO_MAX_CALLSIGN);
if (state > ao_flight_invalid)
state = ao_flight_invalid;
if (recv_orig.status & PKT_APPEND_STATUS_1_CRC_OK) {
diff --git a/src/kernel/ao_radio_cmac.c b/src/kernel/ao_radio_cmac.c
index 155fce35..c7b48e06 100644
--- a/src/kernel/ao_radio_cmac.c
+++ b/src/kernel/ao_radio_cmac.c
@@ -132,7 +132,7 @@ ao_radio_cmac_send(void *packet, uint8_t len)
if (len > AO_CMAC_MAX_LEN)
return AO_RADIO_CMAC_LEN_ERROR;
ao_mutex_get(&ao_radio_cmac_mutex);
- ao_xmemcpy(cmac_data, packet, len);
+ memcpy(cmac_data, packet, len);
#if AO_LED_TX
ao_led_on(AO_LED_TX);
#endif
@@ -159,7 +159,7 @@ ao_radio_cmac_recv(void *packet, uint8_t len, uint16_t timeout)
ao_led_off(AO_LED_RX);
#endif
if (i == AO_RADIO_CMAC_OK)
- ao_xmemcpy(packet, cmac_data, len);
+ memcpy(packet, cmac_data, len);
ao_mutex_put(&ao_radio_cmac_mutex);
return i;
}
diff --git a/src/kernel/ao_telemetry.c b/src/kernel/ao_telemetry.c
index ae33173f..99fc4534 100644
--- a/src/kernel/ao_telemetry.c
+++ b/src/kernel/ao_telemetry.c
@@ -333,12 +333,12 @@ ao_send_configuration(void)
#endif
telemetry.configuration.flight_log_max = ao_config.flight_log_max >> 10;
- ao_xmemcpy (telemetry.configuration.callsign,
- ao_config.callsign,
- AO_MAX_CALLSIGN);
- ao_xmemcpy (telemetry.configuration.version,
- ao_version,
- AO_MAX_VERSION);
+ memcpy (telemetry.configuration.callsign,
+ ao_config.callsign,
+ AO_MAX_CALLSIGN);
+ memcpy (telemetry.configuration.version,
+ ao_version,
+ AO_MAX_VERSION);
ao_telemetry_config_cur = ao_telemetry_config_max;
ao_telemetry_send();
}
@@ -350,6 +350,18 @@ static int8_t ao_telemetry_gps_max;
static int8_t ao_telemetry_loc_cur;
static int8_t ao_telemetry_sat_cur;
+static inline void *
+telemetry_bits(struct ao_telemetry_location *l)
+{
+ return ((uint8_t *) l) + offsetof(struct ao_telemetry_location, flags);
+}
+
+static inline int
+telemetry_size(void)
+{
+ return sizeof(struct ao_telemetry_location) - offsetof(struct ao_telemetry_location, flags);
+}
+
static void
ao_send_location(void)
{
@@ -357,9 +369,9 @@ ao_send_location(void)
{
telemetry.generic.type = AO_TELEMETRY_LOCATION;
ao_mutex_get(&ao_gps_mutex);
- ao_xmemcpy(&telemetry.location.flags,
- &ao_gps_data.flags,
- 27);
+ memcpy(telemetry_bits(&telemetry.location),
+ telemetry_bits(&ao_gps_data),
+ telemetry_size());
telemetry.location.tick = ao_gps_tick;
ao_mutex_put(&ao_gps_mutex);
ao_telemetry_loc_cur = ao_telemetry_gps_max;
@@ -375,7 +387,7 @@ ao_send_satellite(void)
telemetry.generic.type = AO_TELEMETRY_SATELLITE;
ao_mutex_get(&ao_gps_mutex);
telemetry.satellite.channels = ao_gps_tracking_data.channels;
- ao_xmemcpy(&telemetry.satellite.sats,
+ memcpy(&telemetry.satellite.sats,
&ao_gps_tracking_data.sats,
AO_MAX_GPS_TRACKING * sizeof (struct ao_telemetry_satellite_info));
ao_mutex_put(&ao_gps_mutex);
@@ -399,7 +411,7 @@ ao_send_companion(void)
telemetry.companion.update_period = ao_companion_setup.update_period;
telemetry.companion.channels = ao_companion_setup.channels;
ao_mutex_get(&ao_companion_mutex);
- ao_xmemcpy(&telemetry.companion.companion_data,
+ memcpy(&telemetry.companion.companion_data,
ao_companion_data,
ao_companion_setup.channels * 2);
ao_mutex_put(&ao_companion_mutex);
diff --git a/src/product/ao_terraui.c b/src/product/ao_terraui.c
index 3a989f5a..102abb91 100644
--- a/src/product/ao_terraui.c
+++ b/src/product/ao_terraui.c
@@ -598,7 +598,7 @@ ao_terramonitor(void)
case AO_TELEMETRY_SENSOR_TELEMETRUM:
case AO_TELEMETRY_SENSOR_TELEMINI:
case AO_TELEMETRY_SENSOR_TELENANO:
- ao_xmemcpy(&ao_tel_sensor, &ao_monitor_ring[monitor], sizeof (ao_tel_sensor));
+ memcpy(&ao_tel_sensor, &ao_monitor_ring[monitor], sizeof (ao_tel_sensor));
if (ao_tel_sensor.state < ao_flight_boost) {
ao_tel_max_speed = 0;
ao_tel_max_height = 0;
@@ -611,10 +611,10 @@ ao_terramonitor(void)
ao_telem_progress = (ao_telem_progress + 1) & 0x3;
break;
case AO_TELEMETRY_LOCATION:
- ao_xmemcpy(&ao_tel_location, &ao_monitor_ring[monitor], sizeof (ao_tel_location));
+ memcpy(&ao_tel_location, &ao_monitor_ring[monitor], sizeof (ao_tel_location));
break;
case AO_TELEMETRY_CONFIGURATION:
- ao_xmemcpy(&ao_tel_config, &ao_monitor_ring[monitor], sizeof (ao_tel_config));
+ memcpy(&ao_tel_config, &ao_monitor_ring[monitor], sizeof (ao_tel_config));
}
}
}
diff --git a/src/test/ao_flight_test.c b/src/test/ao_flight_test.c
index 6d007575..35e0da3f 100644
--- a/src/test/ao_flight_test.c
+++ b/src/test/ao_flight_test.c
@@ -331,10 +331,6 @@ struct ao_cmds {
const char *help;
};
-#define ao_xmemcpy(d,s,c) memcpy(d,s,c)
-#define ao_xmemset(d,v,c) memset(d,v,c)
-#define ao_xmemcmp(d,s,c) memcmp(d,s,c)
-
#define AO_NEED_ALTITUDE_TO_PRES 1
#if TELEMEGA || TELEMETRUM_V2 || EASYMINI
#include "ao_convert_pa.c"
@@ -358,9 +354,6 @@ struct ao_ms5607_prom ao_ms5607_prom;
struct ao_config ao_config;
-#define x (x)
-
-
extern int16_t ao_ground_accel, ao_flight_accel;
extern int16_t ao_accel_2g;