Added debugging for configuration function of the application interface.
This commit is contained in:
parent
61994e0e0e
commit
1cf5448e88
1
TODO
1
TODO
|
|
@ -13,7 +13,6 @@ Version 1.4.0:
|
|||
* Race in jiffies frame timeout?
|
||||
* Remove ec_sync_t::assign_source?
|
||||
* Repair rcethercat status.
|
||||
* Debug output for all configuration functions of the application interface.
|
||||
* Abort code messages in userspace.
|
||||
|
||||
Future issues:
|
||||
|
|
|
|||
|
|
@ -322,6 +322,10 @@ int ecrt_domain_reg_pdo_entry_list(ec_domain_t *domain,
|
|||
ec_slave_config_t *sc;
|
||||
int ret;
|
||||
|
||||
if (domain->master->debug_level)
|
||||
EC_DBG("ecrt_domain_reg_pdo_entry_list(domain = 0x%x, regs = 0x%x)\n",
|
||||
(u32) domain, (u32) regs);
|
||||
|
||||
for (reg = regs; reg->index; reg++) {
|
||||
if (!(sc = ecrt_master_slave_config(domain->master, reg->alias,
|
||||
reg->position, reg->vendor_id, reg->product_code)))
|
||||
|
|
@ -348,6 +352,10 @@ size_t ecrt_domain_size(ec_domain_t *domain)
|
|||
|
||||
void ecrt_domain_external_memory(ec_domain_t *domain, uint8_t *mem)
|
||||
{
|
||||
if (domain->master->debug_level)
|
||||
EC_DBG("ecrt_domain_external_memory(domain = 0x%x, mem = 0x%x)\n",
|
||||
(u32) domain, (u32) mem);
|
||||
|
||||
down(&domain->master->master_sem);
|
||||
|
||||
ec_domain_clear_data(domain);
|
||||
|
|
|
|||
|
|
@ -1219,6 +1219,9 @@ ec_domain_t *ecrt_master_create_domain(ec_master_t *master /**< master */)
|
|||
ec_domain_t *domain, *last_domain;
|
||||
unsigned int index;
|
||||
|
||||
if (master->debug_level)
|
||||
EC_DBG("ecrt_master_create_domain(master = 0x%x)\n", (u32) master);
|
||||
|
||||
if (!(domain = (ec_domain_t *) kmalloc(sizeof(ec_domain_t), GFP_KERNEL))) {
|
||||
EC_ERR("Error allocating domain memory!\n");
|
||||
return NULL;
|
||||
|
|
@ -1238,6 +1241,9 @@ ec_domain_t *ecrt_master_create_domain(ec_master_t *master /**< master */)
|
|||
|
||||
up(&master->master_sem);
|
||||
|
||||
if (master->debug_level)
|
||||
EC_DBG("Created domain %u.\n", domain->index);
|
||||
|
||||
return domain;
|
||||
}
|
||||
|
||||
|
|
@ -1248,6 +1254,9 @@ int ecrt_master_activate(ec_master_t *master)
|
|||
uint32_t domain_offset;
|
||||
ec_domain_t *domain;
|
||||
|
||||
if (master->debug_level)
|
||||
EC_DBG("ecrt_master_activate(master = 0x%x)\n", (u32) master);
|
||||
|
||||
down(&master->master_sem);
|
||||
|
||||
// finish all domains
|
||||
|
|
@ -1384,6 +1393,12 @@ ec_slave_config_t *ecrt_master_slave_config(ec_master_t *master,
|
|||
ec_slave_config_t *sc;
|
||||
unsigned int found = 0;
|
||||
|
||||
|
||||
if (master->debug_level)
|
||||
EC_DBG("ecrt_master_slave_config(master = 0x%x, alias = %u, "
|
||||
"position = %u, vendor_id = %u, product_code = %u)\n",
|
||||
(u32) master, alias, position, vendor_id, product_code);
|
||||
|
||||
list_for_each_entry(sc, &master->configs, list) {
|
||||
if (sc->alias == alias && sc->position == position) {
|
||||
found = 1;
|
||||
|
|
@ -1432,6 +1447,11 @@ ec_slave_config_t *ecrt_master_slave_config(ec_master_t *master,
|
|||
void ecrt_master_callbacks(ec_master_t *master, int (*request_cb)(void *),
|
||||
void (*release_cb)(void *), void *cb_data)
|
||||
{
|
||||
if (master->debug_level)
|
||||
EC_DBG("ecrt_master_callbacks(master = 0x%x, request_cb = 0x%x, "
|
||||
" release_cb = 0x%x, cb_data = 0x%x)\n", (u32) master,
|
||||
(u32) request_cb, (u32) release_cb, (u32) cb_data);
|
||||
|
||||
master->ext_request_cb = request_cb;
|
||||
master->ext_release_cb = release_cb;
|
||||
master->ext_cb_data = cb_data;
|
||||
|
|
|
|||
|
|
@ -709,6 +709,11 @@ ec_sdo_request_t *ecrt_slave_config_create_sdo_request(ec_slave_config_t *sc,
|
|||
{
|
||||
ec_sdo_request_t *req;
|
||||
|
||||
if (sc->master->debug_level)
|
||||
EC_DBG("ecrt_slave_config_create_sdo_request(sc = 0x%x, "
|
||||
"index = 0x%04X, subindex = 0x%02X, size = %u)\n", (u32) sc,
|
||||
index, subindex, size);
|
||||
|
||||
if (!(req = (ec_sdo_request_t *)
|
||||
kmalloc(sizeof(ec_sdo_request_t), GFP_KERNEL))) {
|
||||
EC_ERR("Failed to allocate Sdo request memory!\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue