TTK4155 Lab Node 1
Term project in the NTNU course TTK4155 Embedded and Industrial Computer Systems Design
Loading...
Searching...
No Matches
controller.h File Reference

Handles CAN communication for game control, joystick, and buttons. More...

#include "can.h"
#include "io.h"

Go to the source code of this file.

Data Structures

struct  control_state
 Stores current control state. More...

Functions

uint8_t process_can_frame (struct control_state *ctrl)
 Processes an incoming CAN frame.
int8_t tx_joy_btn (struct io_joystick_device *joy_dev, struct io_avr_device *avr_dev, struct can_device *can_dev)
 Transmits joystick positions and button states via CAN.
int8_t tx_gamestart (struct can_device *can_dev)
 Sends a game start message via CAN.
int8_t tx_reset (struct can_device *can_dev)
 Sends a reset message via CAN.
int8_t tx_error (struct can_device *can_dev)
 Sends an error message via CAN.

Detailed Description

Handles CAN communication for game control, joystick, and buttons.

Definition in file controller.h.