dodany kod c od Krzyska po wielu modyfikacjach przez Gemini zeby usunac zalezność od TI-RTOS
This commit is contained in:
46
src/bin_in.h
Normal file
46
src/bin_in.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* bin_in.h
|
||||
*
|
||||
* Created on: 07-04-2014
|
||||
* Author: Krzysztof Jakubczyk
|
||||
*/
|
||||
|
||||
#ifndef BIN_IN_H_
|
||||
#define BIN_IN_H_
|
||||
|
||||
#include "tdefs.h"
|
||||
|
||||
struct bin_in_logic
|
||||
{
|
||||
u8 *out_ptr;
|
||||
u8 out_bit_mask;
|
||||
u8 *kob_ptr;
|
||||
u8 kob_bit_mask;
|
||||
u8 in_num_mask;
|
||||
u16 card_addr_mask;
|
||||
};
|
||||
|
||||
struct bin_in_io
|
||||
{
|
||||
u32 out; // one bit output for one binary input
|
||||
u32 kob_out;
|
||||
}__attribute__((__packed__));
|
||||
|
||||
struct bin_in_params
|
||||
{
|
||||
u32 card_addr;
|
||||
u32 in_num;
|
||||
u32 ac_filter;
|
||||
}__attribute__((__packed__));
|
||||
|
||||
struct bin_in_args
|
||||
{
|
||||
struct bin_in_io io;
|
||||
struct bin_in_params params;
|
||||
// u16 crc;
|
||||
}__attribute__((__packed__));
|
||||
|
||||
extern void bin_in(void *args, void *logic);
|
||||
extern int bin_in_initlog(void *args, void *logic);
|
||||
|
||||
#endif /* BIN_IN_H_ */
|
||||
Reference in New Issue
Block a user