This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

请问F28377里这两个函数的第一个参数是什么意思啊?

GPIO_SetupPinOptions(17,GPIO_OUTPUT,GPIO_PUSHPULL);
GPIO_SetupPinMux(17,GPIO_MUX_CPU1,0);

就是说上面的17,应该不是对应的GPIO口吧......看函数注释没看懂.....

  • //Set the peripheral muxing for the specified pin. The appropriate
    //parameters can be found in the GPIO Muxed Pins table(4.4) in the datasheet.
    //Use the GPIO index row (0 to 15) to select a muxing option for the GPIO.


    void GPIO_SetupPinMux(Uint16 pin, Uint16 cpu, Uint16 peripheral)

    //Setup up the GPIO input/output options for the specified pin.
    //The flags are a 16-bit mask produced by ORing together options.
    //For input pins, the valid flags are:
    //GPIO_PULLUP Enable pull-up
    //GPIO_INVERT Enable input polarity inversion
    //GPIO_SYNC Synchronize the input latch to PLLSYSCLK (default -- you don't need to specify this)
    //GPIO_QUAL3 Use 3-sample qualification
    //GPIO_QUAL6 Use 6-sample qualification
    //GPIO_ASYNC Do not use synchronization or qualification
    //(Note: only one of SYNC, QUAL3, QUAL6, or ASYNC is allowed)
    //
    //For output pins, the valid flags are:
    //GPIO_OPENDRAIN Output in open drain mode
    //GPIO_PULLUP If open drain enabled, also enable the pull-up
    //and the input qualification flags (SYNC/QUAL3/QUAL6/SYNC) listed above.
    //
    //With no flags, the default input state is synchronous with no
    //pull-up or polarity inversion. The default output state is
    //the standard digital output.

    void GPIO_SetupPinOptions(Uint16 pin, Uint16 output, Uint16 flags)

  • 其实我就是这些注释话没看懂,后面两个参数我懂,就是第一个参数是怎么对应到GPIO上的?

  • 就是指GPIO 17,例程中都是这么写的