I cant find out the issue…
i am looking into mios32_ain.c and mios32_board.c
and when i break it down to the J5 Part, a code for initialze and get the J5 Pins would be like this (debuging give me a 0)
void APP\_MIDI\_Tick(void){ // Test J5 Pin every second static int secflag = 0; secflag++; if( secflag \> 1000) { secflag = 0; // this table maps ADC channels to J5.Ax pins typedef struct { u8 chn; GPIO\_TypeDef \*port; u16 pin\_mask; } adc\_chn\_map\_t; static const adc\_chn\_map\_t adc\_chn\_map[8] = { { ADC\_Channel\_11, GPIOC, GPIO\_Pin\_1 }, // J5A.A0 { ADC\_Channel\_12, GPIOC, GPIO\_Pin\_2 }, // J5A.A1 { ADC\_Channel\_1, GPIOA, GPIO\_Pin\_1 }, // J5A.A2 { ADC\_Channel\_4, GPIOA, GPIO\_Pin\_4 }, // J5A.A3 { ADC\_Channel\_14, GPIOC, GPIO\_Pin\_4 }, // J5B.A4 { ADC\_Channel\_15, GPIOC, GPIO\_Pin\_5 }, // J5B.A5 { ADC\_Channel\_8, GPIOB, GPIO\_Pin\_0 }, // J5B.A6 { ADC\_Channel\_9, GPIOB, GPIO\_Pin\_1 }, // J5B.A7 }; // set analog pins GPIO\_InitTypeDef GPIO\_InitStructure; GPIO\_StructInit(&GPIO\_InitStructure); GPIO\_InitStructure.GPIO\_Mode = GPIO\_Mode\_AN; GPIO\_InitStructure.GPIO\_PuPd = GPIO\_PuPd\_NOPULL; int i;for(i=0; i\<8; ++i) { GPIO\_InitStructure.GPIO\_Pin = adc\_chn\_map[i].pin\_mask; GPIO\_Init(adc\_chn\_map[i].port, &GPIO\_InitStructure); } MIOS32\_MIDI\_SendDebugMessage("J5A Pin0: %d", MIOS32\_SYS\_STM\_PINGET(GPIOC, GPIO\_Pin\_1) ) ; MIOS32\_MIDI\_SendDebugMessage("J5B Pin0: %d", MIOS32\_SYS\_STM\_PINGET(GPIOC, GPIO\_Pin\_4) ) ; }
if i break it down to get J5A Pin 0 and J5B Pin0 the code should look like this? (this again debugging return me 0 and 0!
void APP\_MIDI\_Tick(void){ // Test J5 Pin every second static int secflag = 0; secflag++; if( secflag \> 1000) { secflag = 0; // set analog pins GPIO\_InitTypeDef GPIO\_InitStructure; GPIO\_StructInit(&GPIO\_InitStructure); GPIO\_InitStructure.GPIO\_Mode = GPIO\_Mode\_AN; GPIO\_InitStructure.GPIO\_PuPd = GPIO\_PuPd\_NOPULL; // PIN J5A 0 GPIO\_InitStructure.GPIO\_Pin = GPIO\_Pin\_1; GPIO\_Init(GPIOC, &GPIO\_InitStructure); // PIN J5B 0 GPIO\_InitStructure.GPIO\_Pin = GPIO\_Pin\_4; GPIO\_Init(GPIOC, &GPIO\_InitStructure); MIOS32\_MIDI\_SendDebugMessage("J5A Pin0: %d", MIOS32\_SYS\_STM\_PINGET(GPIOC, GPIO\_Pin\_1) ) ; MIOS32\_MIDI\_SendDebugMessage("J5B Pin0: %d", MIOS32\_SYS\_STM\_PINGET(GPIOC, GPIO\_Pin\_4) ) ; }
And i cant find:" MIOS32_SYS_STM_PINGET()"? >>> it isnt: http://www.midibox.org/mios32/manual/_s_t_m32_f4xx_2mios32__sys_8c.html
because there isnt a “STM_PINGET” ? or is it?
… on this point my research stops, since i cant find it
just try to find out where the problem is, since the simple and userfriendly “MIOS32_BOARD_J5_PinGet (4);” wont work…