Hallo!
Habe gerade etwas total komisches :)
Ich will PA0 abfragen.
1 | //User taster lesen
|
2 | if(GPIO_ReadInputData(GPIOA, GPIO_Pin_0)){
|
3 | Ebene2();
|
4 | }
|
Und der Compiler sagt mir:
main.c:142:4: error: too many arguments to function 'GPIO_ReadInputData'
Benutze die standert GPIO lib von ST. Dort steht:
1 | * @brief Reads the specified input port pin.
|
2 | * @param GPIOx: where x can be (A..K) to select the GPIO peripheral for STM32F405xx/407xx and STM32F415xx/417xx devices
|
3 | * x can be (A..I) to select the GPIO peripheral for STM32F42xxx/43xxx devices.
|
4 | * x can be (A, B, C, D and H) to select the GPIO peripheral for STM32F401xx devices.
|
5 | * @param GPIO_Pin: specifies the port bit to read.
|
6 | * This parameter can be GPIO_Pin_x where x can be (0..15).
|
7 | * @retval The input port pin value.
|
8 | */
|
9 | uint8_t GPIO_ReadInputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
|
10 | {
|
11 | uint8_t bitstatus = 0x00;
|
12 |
|
13 | /* Check the parameters */
|
14 | assert_param(IS_GPIO_ALL_PERIPH(GPIOx));
|
15 | assert_param(IS_GET_GPIO_PIN(GPIO_Pin));
|
16 |
|
17 | .......
|
Also, was für`n Kack? :)
Komischerweise funktioniert if(GPIO_ReadOutputDataBit(GPIOG,
GPIO_Pin_14)){
(Also OUTPUT lesen)
Danke
Grüße Alex S.