Commit 5815b469 authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

work-in-progress-daan-2013-06-06-op-naar-cp2-v2.diff

parent bab5bbe6
This diff is collapsed.
...@@ -261,6 +261,10 @@ int esc_device_initialize_pre_operational(struct esc_device *dev) ...@@ -261,6 +261,10 @@ int esc_device_initialize_pre_operational(struct esc_device *dev)
esc_dc_init(&dev->addr, &dev->dc_sync); esc_dc_init(&dev->addr, &dev->dc_sync);
esc_watchdog_init(dev); esc_watchdog_init(dev);
// DAAN: Do we want to loose the value or r here in the 'r == -1'
// case?
// Should we always try to start the poll thread and ignore it's
// return value, or only start the thread if (r != -1)?
r = esc_device_poll_start(dev); r = esc_device_poll_start(dev);
dev->auto_recover = true; dev->auto_recover = true;
......
...@@ -65,6 +65,7 @@ int sercos_bus_add(struct sercos_bus *bus) ...@@ -65,6 +65,7 @@ int sercos_bus_add(struct sercos_bus *bus)
return 0; return 0;
} }
#if 0
uint16_t sercos_idn(bool product, int param_set, int blocknr) uint16_t sercos_idn(bool product, int param_set, int blocknr)
{ {
uint16_t idn; uint16_t idn;
...@@ -75,6 +76,7 @@ uint16_t sercos_idn(bool product, int param_set, int blocknr) ...@@ -75,6 +76,7 @@ uint16_t sercos_idn(bool product, int param_set, int blocknr)
return idn; return idn;
} }
#endif
struct sercos_bus *sercos_bus_find(char *name) struct sercos_bus *sercos_bus_find(char *name)
{ {
......
...@@ -50,7 +50,12 @@ struct sercos_bus *sercos_bus_alloc(char *name, size_t privsize); ...@@ -50,7 +50,12 @@ struct sercos_bus *sercos_bus_alloc(char *name, size_t privsize);
int sercos_bus_add(struct sercos_bus *bus); int sercos_bus_add(struct sercos_bus *bus);
struct sercos_bus *sercos_bus_find(char *name); struct sercos_bus *sercos_bus_find(char *name);
uint16_t sercos_idn(bool product, int param_set, int blocknr); //DAAN: make this a macro, so we can use it to initialise arrays
//uint16_t sercos_idn(bool product, int param_set, int blocknr);
#define sercos_idn(product, param_set, blocknr) \
(((product) ? 0x8000 : 0x0000) + (((param_set) & 0x7) << 12) + \
((blocknr) & 0x0fff))
#endif /* _INCLUDE_SERCOS_H_ */ #endif /* _INCLUDE_SERCOS_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment