INF2004-Project v0.1
 
Loading...
Searching...
No Matches
main.c File Reference

Demonstration for the PID driver. More...

#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#include <sys/cdefs.h>
#include <sys/types.h>
#include "hardware/gpio.h"
#include "pico/stdio.h"
#include "motor/motor_control.h"
#include "pid/pid.h"
Include dependency graph for main.c:

Functions

void encoder_tick_isr (__unused uint gpio, __unused uint32_t events)
 Interrupt callback function on rising edge. More...
 
int main (void)
 

Variables

pid_turn_params_t g_turn_params
 Global turn parameters struct.
 

Detailed Description

Demonstration for the PID driver.

Author
Bryan Seah
Version
0.1
Date
2023-11-28

Function Documentation

◆ encoder_tick_isr()

void encoder_tick_isr ( __unused uint  gpio,
__unused uint32_t  events 
)

Interrupt callback function on rising edge.

Parameters
[in]gpioGPIO pin number.
[in]eventsEvent mask.
See also
gpio_irq_level.

References pid_turn_params::encoder_step_count, encoder_tick_isr(), g_turn_params, pid_navigate_turn(), and pid_turn_params::turn_direction.

Here is the call graph for this function:
Here is the caller graph for this function: