| 21 | User code interacts with the scheduler via the following functions: |
| 22 | |
| 23 | {{{u32 wlan_mac_schedule_event(u8 scheduler_sel, u32 delay, void(*callback)())}}}: |
| 24 | * {{{scheduler_sel}}}: select the coarse (±100ms accuracy) or fine (±100µs accuracy) scheduler; must be {{{SCHEDULE_COARSE}}} or {{{SCHEDULE_FINE}}} |
| 25 | * {{{delay}}}: time in microseconds before {{{callback}}} is called |
| 26 | * {{{callback}}}: function pointer to callback to execute after {{{delay}}} µs |
| 27 | * Returns u32 {{{id}}} for new scheduler entry or {{{SCHEDULE_FAILURE}}} on failure |
| 28 | |
| 29 | |
| 30 | {{{void wlan_mac_remove_schedule(u8 scheduler_sel, u32 id)}}} |
| 31 | * {{{scheduler_sel}}}: select the coarse (±100ms accuracy) or fine (±100µs accuracy) scheduler; must be {{{SCHEDULE_COARSE}}} or {{{SCHEDULE_FINE}}} |
| 32 | * {{{id}}}: event ID previously returned by {{{wlan_mac_schedule_event}}} |
| 33 | |
| 34 | == Implementation == |
| 35 | The scheduler is implemented in the [browser:ReferenceDesigns/w3_802.11/c/wlan_mac_high_framework/wlan_mac_schedule.c wlan_mac_schedule.c] file. The scheduler uses the axi_timer core attached to CPU High in interrupt mode. |