1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00

Read timeslot count

This commit is contained in:
Alex Forencich 2019-11-05 18:20:21 -08:00
parent f53a6b20e8
commit abdb714fd9
3 changed files with 6 additions and 0 deletions

View File

@ -197,6 +197,8 @@ int main(int argc, char *argv[])
printf("Sched stride: 0x%08x\n", dev_port->sched_stride);
printf("Sched type: 0x%08x\n", dev_port->sched_type);
printf("Timeslot count: %d\n", dev_port->tdma_timeslot_count);
if (period_nsec > 0)
{
printf("Configure port TDMA schedule\n");

View File

@ -142,6 +142,8 @@ struct mqnic *mqnic_open(const char *dev_name)
port->sched_offset = mqnic_reg_read32(port->regs, MQNIC_PORT_REG_SCHED_OFFSET);
port->sched_stride = mqnic_reg_read32(port->regs, MQNIC_PORT_REG_SCHED_STRIDE);
port->sched_type = mqnic_reg_read32(port->regs, MQNIC_PORT_REG_SCHED_TYPE);
port->tdma_timeslot_count = mqnic_reg_read32(port->regs, MQNIC_PORT_REG_TDMA_TIMESLOT_COUNT);
}
}

View File

@ -58,6 +58,8 @@ struct mqnic_port {
uint32_t sched_offset;
uint32_t sched_stride;
uint32_t sched_type;
uint32_t tdma_timeslot_count;
};
struct mqnic_if {