Skip to content

Commit dce050a

Browse files
committed
[TARGET_STMF4] reorg hal
some test extensions
1 parent b25f943 commit dce050a

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

libraries/tests/mbed/pwm/main.cpp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,46 @@ int main() {
116116

117117
printf("Initialize PWM on pin PD_12 with duty cycle: %.2f\n", result);
118118

119+
notify_completion(result == value ? true : false);
120+
#elif defined(TARGET_MTS_MDOT_F405RG)
121+
PwmOut pwm_1(PA_0);
122+
123+
pwm_1.write(value);
124+
125+
float result = floor(pwm_1.read() * 100 + 0.5) / 100; // round it to 0.xx
126+
127+
printf("Initialize PWM on pin PD_12 with duty cycle: %.2f\n", result);
128+
129+
notify_completion(result == value ? true : false);
130+
#elif defined(TARGET_MTS_DRAGONFLY_F411RE)
131+
PwmOut pwm_1(PA_0);
132+
133+
pwm_1.write(value);
134+
135+
float result = floor(pwm_1.read() * 100 + 0.5) / 100; // round it to 0.xx
136+
137+
printf("Initialize PWM on pin PD_12 with duty cycle: %.2f\n", result);
138+
139+
notify_completion(result == value ? true : false);
140+
#elif defined(TARGET_MTS_MDOT_F411RE)
141+
PwmOut pwm_1(PA_0);
142+
143+
pwm_1.write(value);
144+
145+
float result = floor(pwm_1.read() * 100 + 0.5) / 100; // round it to 0.xx
146+
147+
printf("Initialize PWM on pin PD_12 with duty cycle: %.2f\n", result);
148+
149+
notify_completion(result == value ? true : false);
150+
#elif defined(TARGET_UBLOX_C029)
151+
PwmOut pwm_1(PA_0);
152+
153+
pwm_1.write(value);
154+
155+
float result = floor(pwm_1.read() * 100 + 0.5) / 100; // round it to 0.xx
156+
157+
printf("Initialize PWM on pin PD_12 with duty cycle: %.2f\n", result);
158+
119159
notify_completion(result == value ? true : false);
120160
#else
121161
#error This test is not supported on this target.

workspace_tools/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
"mcu": ["LPC1768", "LPC2368", "KL25Z", "K64F", "K22F", "LPC4088", "LPC1549",
140140
"NUCLEO_F072RB", "NUCLEO_F091RC", "NUCLEO_F302R8", "NUCLEO_F303RE",
141141
"NUCLEO_F334R8", "NUCLEO_L053R8", "NUCLEO_L073RZ", "NUCLEO_L152RE",
142-
"NUCLEO_F411RE","DISCO_F407VG"]
142+
"NUCLEO_F411RE","DISCO_F407VG","ARCH_MAX"]
143143
},
144144
{
145145
"id": "MBED_A9", "description": "Serial Echo at 115200",

0 commit comments

Comments
 (0)