|
TTK4155 Lab Node 1
Term project in the NTNU course TTK4155 Embedded and Industrial Computer Systems Design
|
Macros | |
| #define | UTILS_DEBUG_LED_PIN PB0 |
| #define | TRASHCAN ((void *)0) |
| #define | STATUS_ASSERT(status) |
| Macro to assert a status and flash a debug LED. | |
Functions | |
| uint8_t | utils_joystick_print_pos (struct io_joystick_position *pos) |
| Prints joystick position (x/y) via UART. | |
| uint8_t | utils_joystick_print_raw (struct io_joystick_device *dev) |
| Prints raw ADC joystick readings via UART. | |
| int16_t | map (uint8_t x, uint8_t in_min, uint8_t in_max, int16_t out_min, int16_t out_max) |
| Maps a value from one range to another (taken from https://docs.arduino.cc/language-reference/en/functions/math/map/). | |
| #define STATUS_ASSERT | ( | status | ) |
#include <utils.h>
Macro to assert a status and flash a debug LED.
| status | Negative sets LED; positive triggers LED flashing; zero does nothing |
Definition at line 26 of file utils.h.
Referenced by main().
| #define TRASHCAN ((void *)0) |
#include <utils.h>
Definition at line 19 of file utils.h.
Referenced by io_avr_buttons_read(), MCP2515_bit_modify(), menu_handler(), page_back(), page_select(), spi_duplex(), spi_push(), spi_recieve(), spi_recieve_n(), spi_send(), and spi_send_n().
| #define UTILS_DEBUG_LED_PIN PB0 |
| int16_t map | ( | uint8_t | x, |
| uint8_t | in_min, | ||
| uint8_t | in_max, | ||
| int16_t | out_min, | ||
| int16_t | out_max ) |
#include <utils.h>
Maps a value from one range to another (taken from https://docs.arduino.cc/language-reference/en/functions/math/map/).
| x | Input value |
| in_min | Input range minimum |
| in_max | Input range maximum |
| out_min | Output range minimum |
| out_max | Output range maximum |
Definition at line 63 of file utils.c.
Referenced by io_joystick_read_position().
| uint8_t utils_joystick_print_pos | ( | struct io_joystick_position * | pos | ) |
#include <utils.h>
Prints joystick position (x/y) via UART.
| pos | Pointer to joystick position struct |
Definition at line 21 of file utils.c.
| uint8_t utils_joystick_print_raw | ( | struct io_joystick_device * | dev | ) |
#include <utils.h>
Prints raw ADC joystick readings via UART.
| dev | Pointer to joystick device |
Definition at line 42 of file utils.c.