Skip to content

Adapting the test_config.h for the Analogio-tests #346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/Makefile.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,9 @@ make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM28 test_wire_connected2_slavepi
## UART

# 2 boards
make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM71 test_uart_connected2_tx monitor
make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM28 test_uart_connected2_rx monitor
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM0 test_uart_connected2_tx monitor
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM1 test_uart_connected2_rx monitor

## AnalogIO

make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM0 test_analogio_adc monitor
26 changes: 26 additions & 0 deletions tests/test_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* @file test_config.h
* @brief Configuration file for board-specific test pin definitions.
*
* This header file contains the definitions of the pins used for testing
* purposes on the specific board.
*/
#ifndef TEST_CONFIG_H
#define TEST_CONFIG_H

#include <stdint.h>

// Digital I/O test pins
const uint8_t TEST_DIGITALIO_OUTPUT = 4; // IO0
const uint8_t TEST_DIGITALIO_INPUT = 2; // IO1

// Analog I/O test pins
#define TEST_PIN_ANALOG_IO_VREF A0 // Pin connected to VREF
#define TEST_PIN_ANALOG_IO_DIVIDER A1 // Pin connected to voltage divider
#define TEST_PIN_ANALOG_IO_GND A2 // Pin connected to GND
#define TEST_PIN_ANALOG_IO_DAC 53 // DAC output pin, siehe pins_arduino.h, entspricht A3 (P14.8)
#define TEST_PIN_ANALOG_IO_DAC_INPUT A3

#define ADC_RESOLUTION 1023 // 10-bit ADC resolution

#endif // TEST_CONFIG_H
Loading