You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
2.3 KiB

Copyright Jeroen Vreeken (, 2013
Copyright Stichting C.A. Muller Radioastronomiestation, 2013
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <>.
#include <ec/esc_device.h>
ssize_t esc_esi_eeprom_read(struct ec *ec, struct ec_dgram_addr *ec_addr,
void *buffer, size_t offset, size_t size);
ssize_t esc_esi_eeprom_write(struct ec *ec, struct ec_dgram_addr *ec_addr,
void *buffer, size_t offset, size_t size);
uint16_t esc_esi_read16(struct ec *ec, struct ec_dgram_addr *ec_addr, size_t offset);
uint32_t esc_esi_read32(struct ec *ec, struct ec_dgram_addr *ec_addr, size_t offset);
uint8_t esc_esi_crc8(void *data, size_t size);
uint32_t esc_esi_vendorid_get(struct esc_device *esc);
uint32_t esc_esi_productcode_get(struct esc_device *esc);
uint32_t esc_esi_revisionno_get(struct esc_device *esc);
uint32_t esc_esi_serialno_get(struct esc_device *esc);
size_t esc_esi_standard_rx_mailbox_offset_get(struct ec *ec, struct ec_dgram_addr *ec_addr);
size_t esc_esi_standard_tx_mailbox_offset_get(struct ec *ec, struct ec_dgram_addr *ec_addr);
size_t esc_esi_standard_rx_mailbox_size_get(struct ec *ec, struct ec_dgram_addr *ec_addr);
size_t esc_esi_standard_tx_mailbox_size_get(struct ec *ec, struct ec_dgram_addr *ec_addr);
struct esc_esi_category {
size_t length;
uint16_t type;
unsigned char *data;
struct esc_esi_category *next;
struct esc_esi_category *esc_esi_categories_create(struct ec *ec, struct ec_dgram_addr *ec_addr);
void esc_esi_categories_destroy(struct esc_esi_category *cat);
ssize_t esc_esi_category_strings_get(struct esc_esi_category *categories,
int nr, char *str, size_t len);
int esc_esi_device_fill(struct esc_device *dev);
#endif /* _INCLUDE_EC_ESC_ESI_H_ */