You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

21 lines
530 B
C

#ifndef _MODBUS_MASTER_H_
#define _MODBUS_MASTER_H_
#include <stdint.h>
#define receiveOkay (modbusGetBusState() & (1<<ReceiveCompleted))
extern int32_t kraftsensor_value;
extern uint8_t kraftsensor_valid;
extern int32_t kraftsensor_zero_offset;
void timer2_init();
void kraftsensor_init();
void do_kraftsensor(void);
int8_t wait_receive(uint8_t len, uint16_t dest[], uint8_t timeout);
void readReg(uint8_t slaveid, uint16_t address, uint8_t amount);
void writeReg(uint8_t slaveid, uint16_t address, uint16_t value);
#endif