Skip to content

Commit 85185d9

Browse files
committed
tests: Update test_config.h for test_analogio_adc.cpp.
Signed-off-by: Frederikwag <[email protected]>
1 parent 28068a6 commit 85185d9

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

tests/Makefile.test

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,8 @@ make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM0 test_spi_connected
4040
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM1 test_spi_connected2_slave monitor
4141

4242
# 1 board, loopback
43-
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM0 test_spi_connected1_loopback monitor
43+
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM0 test_spi_connected1_loopback
44+
45+
## AnalogIO
46+
47+
make FQBN=arduino-git:xmc:XMC4700_Relax_Kit PORT=/dev/ttyACM0 test_analogio_adc monitor

tests/test_config.h

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,24 @@
33
* @brief Configuration file for board-specific test pin definitions.
44
*
55
* This header file contains the definitions of the pins used for testing
6-
* purposes on the specific board. These pins are configured as output and
7-
* input pins for various test scenarios.
8-
*
6+
* purposes on the specific board.
97
*/
10-
#ifndef TEST_CONFIG_H
11-
#define TEST_CONFIG_H
12-
13-
#include <stdint.h>
14-
15-
// test defines
16-
const uint8_t TEST_DIGITALIO_OUTPUT = 4; // IO0
17-
const uint8_t TEST_DIGITALIO_INPUT = 2; // IO1
18-
19-
#endif // TEST_CONFIG_H
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)