Files
templates/c/set-protocol/ports/tms320f28335/ump_tms28335.h
T

22 lines
1.2 KiB
C

/*
* Порт УМП для TMS320F28335. Аппаратное представление данных C28x связывается с общим
* регистровым протоколом; восьмибитные октеты линии нельзя приравнивать к размеру char
* целевого компилятора.
*/
#ifndef UMP_TMS28335_H
#define UMP_TMS28335_H
#include "../../include/ump_protocol.h"
/* Application provides ump_log_read/write; caller holds the snapshot IRQ lock.
* No peripheral registers, ISR installation or transport waits in this port. */
unsigned ump_tms28335_prepare(unsigned function, uint16_t address, uint16_t value,
uint16_t *reply, unsigned *error);
size_t ump_tms28335_rtu(unsigned device, unsigned function, uint16_t address,
uint16_t value, ump_octet *reply, size_t capacity);
unsigned ump_tms28335_capture(unsigned function, uint16_t address, uint16_t value,
uint16_t *words, unsigned *error);
/* Convert one pair to TI eCAN MDL/MDH register values; returns 8 or 0. */
unsigned ump_tms28335_fragment(const uint16_t *words, unsigned count, unsigned index,
unsigned token, unsigned error, uint32_t *mdl, uint32_t *mdh);
#endif