/* Inverts the logical output level set using DATAOUT register This inversion applicable only for LP_GPIO_x.  */
enum status_code gpio_pin_invert_output_level(const uint8_t gpio_pin, const bool invert)
/* Inverts the logical output level set using DATAOUT register This inversion applicable only for LP_GPIO_x.  */
enum status_code gpio_pin_invert_output_level(const uint8_t gpio_pin, const bool invert)
{
	enum status_code status = STATUS_OK;
	if (gpio_pin <= 23) {
		if(invert)
			LPMCU_MISC_REGS0->INVERT_OUTPUT_CTRL.reg |= (1 << gpio_pin);
		else
			LPMCU_MISC_REGS0->INVERT_OUTPUT_CTRL.reg &= ~(1 << gpio_pin);
	} else
		status = STATUS_ERR_INVALID_ARG;
	return status;
}