MSS_GPIO_set_output

Function MSS_GPIO_set_output 

Source
pub unsafe extern "C" fn MSS_GPIO_set_output(
    gpio: *mut GPIO_TypeDef,
    port_id: mss_gpio_id_t,
    value: u8,
)
Expand description

MSS_GPIO_set_output() sets the state of a single GPIO port configured as an output.

@param gpio The gpio parameter specifies the GPIO block that needs to be configured.

@param port_id The port_id parameter identifies the GPIO port that is to have its output set. An enumeration item of the form MSS_GPIO_n, where n is the number of the GPIO port, identifies the GPIO port. For example, MSS_GPIO_0 identifies the first GPIO port and MSS_GPIO_31 identifies the last GPIO port.

@param value The value parameter specifies the desired state for the GPIO output. A value of 0 sets the output Low and a value of 1 sets the output High.

@return This function does not return a value.

@example The following call sets GPIO output 12 High, leaving all other GPIO outputs unaffected: @code #include “mss_gpio.h” int main(void) { MSS_GPIO_init(GPIO0_LO); MSS_GPIO_config_all(GPIO0_LO, MSS_GPIO_INOUT_MODE); MSS_GPIO_set_output(GPIO0_LO, MSS_GPIO_13, 1); return (0u); } @endcode