Skip to content

Commit 610acd3

Browse files
committed
tests: Update test_config.h for test_analogio_adc.cpp.
Signed-off-by: Frederikwag <[email protected]>
1 parent eb438ea commit 610acd3

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

tests/Makefile.test

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,9 @@ make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM28 test_wire_connected2_slavepi
2525
## UART
2626

2727
# 2 boards
28-
make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM71 test_uart_connected2_tx monitor
29-
make FQBN=Infineon:xmc:XMC4700_Relax_Kit PORT=COM28 test_uart_connected2_rx monitor
28+
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM0 test_uart_connected2_tx monitor
29+
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM1 test_uart_connected2_rx monitor
30+
31+
## AnalogIO
32+
33+
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM0 test_analogio_adc monitor

tests/test_config.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/**
2+
* @file test_config.h
3+
* @brief Configuration file for board-specific test pin definitions.
4+
*
5+
* This header file contains the definitions of the pins used for testing
6+
* purposes on the specific board.
7+
*/
8+
#ifndef TEST_CONFIG_H
9+
#define TEST_CONFIG_H
10+
11+
#include <stdint.h>
12+
13+
// Digital I/O test pins
14+
const uint8_t TEST_DIGITALIO_OUTPUT = 4; // IO0
15+
const uint8_t TEST_DIGITALIO_INPUT = 2; // IO1
16+
17+
// Analog I/O test pins
18+
#define TEST_PIN_ANALOG_IO_VREF A0 // Pin connected to VREF
19+
#define TEST_PIN_ANALOG_IO_DIVIDER A1 // Pin connected to voltage divider
20+
#define TEST_PIN_ANALOG_IO_GND A2 // Pin connected to GND
21+
#define TEST_PIN_ANALOG_IO_DAC 53 // DAC output pin, siehe pins_arduino.h, entspricht A3 (P14.8)
22+
#define TEST_PIN_ANALOG_IO_DAC_INPUT A3
23+
24+
#define ADC_RESOLUTION 1023 // 10-bit ADC resolution
25+
26+
#endif // TEST_CONFIG_H

0 commit comments

Comments
 (0)