-/*
- * Read a 16-bit value from the USB target
- */
-
-static uint16_t
-get_uint16_cc(struct cc_usb *cc, uint32_t addr)
-{
- struct ao_hex_image *hex = ao_self_read(cc, addr, 2);
- uint16_t v;
- uint8_t *data;
-
- if (!hex)
- return 0;
- data = hex->data + addr - hex->address;
- v = data[0] | (data[1] << 8);
- free(hex);
- return v;
-}
-
-static uint32_t
-get_uint32_cc(struct cc_usb *cc, uint32_t addr)
-{
- struct ao_hex_image *hex = ao_self_read(cc, addr, 4);
- uint32_t v;
- uint8_t *data;
-
- if (!hex)
- return 0;
- data = hex->data + addr - hex->address;
- v = data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24);
- free(hex);
- return v;
-}
-