Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
dt_ctrl
Commits
4b8f214d
Commit
4b8f214d
authored
Aug 21, 2014
by
Jeroen Vreeken
Browse files
move controller to new build
parent
56d8add4
Changes
119
Hide whitespace changes
Inline
Side-by-side
controller/ec/block_beckhoff_el3xxx.c
View file @
4b8f214d
...
...
@@ -25,13 +25,13 @@
#include
<controller/controller_block.h>
#include
"
block_beckhoff_el3xxx.h
"
#include
"
ec.h
"
#include
"
esc.h
"
#include
"
esc_esi.h
"
#include
"
esc_coe.h
"
#include
"
esc_id.h
"
#include
"
log.h
"
#include
<ec/
block_beckhoff_el3xxx.h
>
#include
<ec/
ec.h
>
#include
<ec/
esc.h
>
#include
<ec/
esc_esi.h
>
#include
<ec/
esc_coe.h
>
#include
<ec/
esc_id.h
>
#include
<log/
log.h
>
struct
controller_block_private
{
...
...
controller/ec/block_beckhoff_el4xxx.c
View file @
4b8f214d
...
...
@@ -23,13 +23,13 @@
#include
<controller/controller_block.h>
#include
"
block_beckhoff_el4xxx.h
"
#include
"
ec.h
"
#include
"
esc.h
"
#include
"
esc_esi.h
"
#include
"
esc_coe.h
"
#include
"
esc_id.h
"
#include
"
log.h
"
#include
<ec/
block_beckhoff_el4xxx.h
>
#include
<ec/
ec.h
>
#include
<ec/
esc.h
>
#include
<ec/
esc_esi.h
>
#include
<ec/
esc_coe.h
>
#include
<ec/
esc_id.h
>
#include
<log/
log.h
>
struct
controller_block_private
{
float
*
output
[
8
];
...
...
controller/ec/block_beckhoff_el5001.c
View file @
4b8f214d
...
...
@@ -24,12 +24,12 @@
#include
<controller/controller_block.h>
#include
"
ec.h
"
#include
"
esc.h
"
#include
"
esc_esi.h
"
#include
"
esc_coe.h
"
#include
"
esc_id.h
"
#include
"
log.h
"
#include
<ec/
ec.h
>
#include
<ec/
esc.h
>
#include
<ec/
esc_esi.h
>
#include
<ec/
esc_coe.h
>
#include
<ec/
esc_id.h
>
#include
<log/
log.h
>
struct
controller_block_private
{
float
converted_value
;
...
...
controller/ec/block_beckhoff_el5101.c
View file @
4b8f214d
...
...
@@ -28,13 +28,13 @@
#include
<controller/controller_block.h>
#include
"
block_beckhoff_el5101.h
"
#include
"
ec.h
"
#include
"
esc.h
"
#include
"
esc_esi.h
"
#include
"
esc_coe.h
"
#include
"
esc_id.h
"
#include
"
log.h
"
#include
<ec/
block_beckhoff_el5101.h
>
#include
<ec/
ec.h
>
#include
<ec/
esc.h
>
#include
<ec/
esc_esi.h
>
#include
<ec/
esc_coe.h
>
#include
<ec/
esc_id.h
>
#include
<log/
log.h
>
#define EL5101_OBJ_SM_OUTPUT 0x1c32
...
...
controller/ec/block_beckhoff_el7031.c
View file @
4b8f214d
...
...
@@ -32,12 +32,12 @@
#include
<controller/controller_block.h>
#include
"
ec.h
"
#include
"
esc.h
"
#include
"
esc_esi.h
"
#include
"
esc_coe.h
"
#include
"
esc_id.h
"
#include
"
log.h
"
#include
<ec/
ec.h
>
#include
<ec/
esc.h
>
#include
<ec/
esc_esi.h
>
#include
<ec/
esc_coe.h
>
#include
<ec/
esc_id.h
>
#include
<log/
log.h
>
struct
controller_block_private
{
unsigned
char
*
rx_buffer
;
...
...
controller/ec/block_ec.c
View file @
4b8f214d
...
...
@@ -23,9 +23,9 @@
#include
<controller/controller_block.h>
#include
"
block_ec.h
"
#include
"
ec.h
"
#include
"
log.h
"
#include
<ec/
block_ec.h
>
#include
<ec/
ec.h
>
#include
<log/
log.h
>
static
struct
controller_block
*
ec_block
=
NULL
;
...
...
controller/ec/block_stoeber.c
View file @
4b8f214d
...
...
@@ -20,10 +20,10 @@
#include
<string.h>
#include
<stdio.h>
#include
"
controller_block.h
"
#include
"
esc.h
"
#include
"
ec_stoeber.h
"
#include
"
log.h
"
#include
<controller/
controller_block.h
>
#include
<ec/
esc.h
>
#include
<ec/
ec_stoeber.h
>
#include
<log/
log.h
>
#define RPM2RADS(val) ((val)*2.0*M_PI/60.0)
...
...
controller/ec/build.mk
0 → 100644
View file @
4b8f214d
EC_TARGETS
+=
$(LIBDIR)
/libethercat.la
EC_SRCS
=
\
$(DIR)
/ec.c
\
$(DIR)
/esc.c
\
$(DIR)
/esc_coe.c
\
$(DIR)
/esc_esi.c
\
$(DIR)
/esc_mailbox.c
\
$(DIR)
/esc_device.c
\
$(DIR)
/esc_watchdog.c
\
$(DIR)
/esc_dc.c
\
$(DIR)
/canopen.c
\
$(DIR)
/ec_stoeber.c
\
$(DIR)
/block_ec.c
\
$(DIR)
/block_beckhoff_el1xxx.c
\
$(DIR)
/block_beckhoff_el2xxx.c
\
$(DIR)
/block_beckhoff_el2502.c
\
$(DIR)
/block_beckhoff_el3xxx.c
\
$(DIR)
/block_beckhoff_el4xxx.c
\
$(DIR)
/block_beckhoff_el5001.c
\
$(DIR)
/block_beckhoff_el5101.c
\
$(DIR)
/block_beckhoff_el7031.c
\
$(DIR)
/block_stoeber.c
ifeq
($(OS), FreeBSD)
EC_SRCS
+=
$(DIR)
/eth_bsd.c
else
EC_SRCS
+=
$(DIR)
/eth_linux.c
endif
EC_OBJS
:=
$(EC_SRCS:.c=.lo)
$(LIBDIR)/libethercat.la
:
libcontroller.la liblog.la
$(LIBDIR)/libethercat.la
:
LDFLAGS += -lm -lpthread -lcontroller -llog
$(LIBDIR)/libethercat.la
:
CFLAGS += -O3 -Wall
$(LIBDIR)/libethercat.la
:
$(EC_OBJS)
$(LIB_LINK)
EC_TARGETS
+=
$(DIR)
/ec_enum
EC_ENUM_SRCS
=
$(DIR)
/ec_enum.c
EC_ENUM_OBJS
:=
$(EC_ENUM_SRCS:.c=.o)
$(DIR)/ec_enum
:
libethercat.la
$(DIR)/ec_enum
:
CFLAGS += -O3 -Wall
$(DIR)/ec_enum
:
LDFLAGS += -lethercat
$(DIR)/ec_enum
:
$(EC_ENUM_OBJS)
TARGETS
+=
$(EC_TARGETS)
CLEAN
+=
$(EC_TARGETS)
$(EC_OBJS)
$(EC_ENUM_OBJS)
SRCS
+=
$(EC_SRCS)
$(EC_ENUM_SRCS)
controller/ec/canopen.c
View file @
4b8f214d
...
...
@@ -27,9 +27,9 @@
#include
<sys/endian.h>
#endif
#include
"
canopen.h
"
#include
<ec/
canopen.h
>
#include
"
log.h
"
#include
<log/
log.h
>
#define CANOPEN_CSS_MASK 0xe0
#define CANOPEN_CSS_INITIATE_DOMAIN_DOWNLOAD (0x1 << 5) // 0x20
...
...
controller/ec/ec.c
View file @
4b8f214d
...
...
@@ -34,12 +34,12 @@
#include
<pthread.h>
#include
<semaphore.h>
#include
"
controller_sample.h
"
#include
<controller/
controller_sample.h
>
#include
"
ec.h
"
#include
"
ec_int.h
"
#include
"
eth.h
"
#include
"
log.h
"
#include
<ec/
ec.h
>
#include
<ec/
ec_int.h
>
#include
<ec/
eth.h
>
#include
<log/
log.h
>
static
int
ec_sock
;
...
...
controller/ec/ec.h
View file @
4b8f214d
...
...
@@ -34,7 +34,7 @@
#define __packed __attribute__((packed))
#endif
#include
"
canopen.h
"
#include
<ec/
canopen.h
>
int
ec_init
(
char
*
ifname
,
bool
single_cycle
);
bool
ec_initialized
(
void
);
...
...
controller/ec/ec_enum.c
View file @
4b8f214d
...
...
@@ -25,12 +25,12 @@
#include
<ctype.h>
#include
<stdarg.h>
#include
"
ec.h
"
#include
"
esc.h
"
#include
"
esc_esi.h
"
#include
"
esc_registers.h
"
#include
"
esc_id.h
"
#include
"
log.h
"
#include
<ec/
ec.h
>
#include
<ec/
esc.h
>
#include
<ec/
esc_esi.h
>
#include
<ec/
esc_registers.h
>
#include
<ec/
esc_id.h
>
#include
<log/
log.h
>
/* Local override, we don't want a complete log implementation */
void
log_send
(
enum
log_type
type
,
char
*
fmt
,
...)
...
...
controller/ec/ec_int.h
View file @
4b8f214d
...
...
@@ -20,9 +20,9 @@
#ifndef _INCLUDE_EC_INT_H_
#define _INCLUDE_EC_INT_H_
#include
"
ec.h
"
#include
"
esc.h
"
#include
"
esc_registers.h
"
#include
<ec/
ec.h
>
#include
<ec/
esc.h
>
#include
<ec/
esc_registers.h
>
#define ETH_P_ETHERCAT 0x88a4
...
...
controller/ec/ec_stoeber.c
View file @
4b8f214d
...
...
@@ -21,13 +21,13 @@
#include
<stdlib.h>
#include
<math.h>
#include
"
esc.h
"
#include
"
esc_esi.h
"
#include
"
esc_coe.h
"
#include
"
esc_mailbox.h
"
#include
"
ec_stoeber.h
"
#include
"
esc_dc.h
"
#include
"
log.h
"
#include
<ec/
esc.h
>
#include
<ec/
esc_esi.h
>
#include
<ec/
esc_coe.h
>
#include
<ec/
esc_mailbox.h
>
#include
<ec/
ec_stoeber.h
>
#include
<ec/
esc_dc.h
>
#include
<log/
log.h
>
static
void
ec_stoeber_emergency_handler
(
struct
canopen_dev
*
dev
,
uint16_t
code
,
uint8_t
reg
,
uint8_t
vendor
[
5
])
...
...
controller/ec/ec_stoeber.h
View file @
4b8f214d
...
...
@@ -20,8 +20,8 @@
#ifndef _INCLUDE_EC_STOEBER_H_
#define _INCLUDE_EC_STOEBER_H_
#include
"
ec.h
"
#include
"
canopen.h
"
#include
<ec/
ec.h
>
#include
<ec/
canopen.h
>
#define STOEBER_PARAM2INDEX(group, nr) (0x2000 + ((group) - 'A') * 0x200 + nr)
...
...
controller/ec/ec_test.c
View file @
4b8f214d
...
...
@@ -23,10 +23,10 @@
#include
<unistd.h>
#include
<time.h>
#include
"
ec.h
"
#include
"
esc.h
"
#include
"
esc_coe.h
"
#include
"
canopen.h
"
#include
<ec/
ec.h
>
#include
<ec/
esc.h
>
#include
<ec/
esc_coe.h
>
#include
<ec/
canopen.h
>
int
main
(
int
argc
,
char
**
argv
)
{
...
...
controller/ec/esc.c
View file @
4b8f214d
...
...
@@ -21,11 +21,11 @@
#include
<stdio.h>
#include
<time.h>
#include
"
esc.h
"
#include
"
esc_registers.h
"
#include
"
ec.h
"
#include
"
canopen.h
"
#include
"
log.h
"
#include
<ec/
esc.h
>
#include
<ec/
esc_registers.h
>
#include
<ec/
ec.h
>
#include
<ec/
canopen.h
>
#include
<log/
log.h
>
bool
esc_timeout_expired
(
struct
timespec
*
start
,
struct
timespec
*
timeout
)
...
...
controller/ec/esc.h
View file @
4b8f214d
...
...
@@ -23,9 +23,9 @@
#include
<unistd.h>
#include
<time.h>
#include
<ec.h>
#include
<ec
/ec
.h>
#include
"
esc_sm.h
"
#include
<ec/
esc_sm.h
>
int
esc_init
(
struct
ec_dgram_addr
*
addr
);
...
...
controller/ec/esc_coe.c
View file @
4b8f214d
...
...
@@ -28,9 +28,9 @@
#include
<limits.h>
#include
<unistd.h>
#include
"
ec.h
"
#include
"
esc_coe.h
"
#include
"
log.h
"
#include
<ec/
ec.h
>
#include
<ec/
esc_coe.h
>
#include
<log/
log.h
>
...
...
controller/ec/esc_coe.h
View file @
4b8f214d
...
...
@@ -20,7 +20,7 @@
#ifndef _INCLUDE_EC_ESC_COE_H_
#define _INCLUDE_EC_ESC_COE_H_
#include
"
esc_mailbox.h
"
#include
<ec/
esc_mailbox.h
>
struct
canopen_dev
*
esc_coe_create
(
struct
esc_mailbox
*
mailbox
);
void
esc_coe_destroy
(
struct
canopen_dev
*
coe
);
...
...
Prev
1
2
3
4
5
6
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment