Merge remote branch 'upstream/master'
This commit is contained in:
@@ -147,5 +147,8 @@ void gpio_port_config_lock(u32 gpioport, u16 gpios)
|
|||||||
reg32 = GPIO_LCKR(gpioport); /* Read LCKK. */
|
reg32 = GPIO_LCKR(gpioport); /* Read LCKK. */
|
||||||
reg32 = GPIO_LCKR(gpioport); /* Read LCKK again. */
|
reg32 = GPIO_LCKR(gpioport); /* Read LCKK again. */
|
||||||
|
|
||||||
|
/* Tell the compiler the variable is actually used. It will get optimized out anyways. */
|
||||||
|
reg32 = reg32;
|
||||||
|
|
||||||
/* If (reg32 & GPIO_LCKK) is true, the lock is now active. */
|
/* If (reg32 & GPIO_LCKK) is true, the lock is now active. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,5 +135,8 @@ void gpio_port_config_lock(u32 gpioport, u16 gpios)
|
|||||||
reg32 = GPIO_LCKR(gpioport); /* Read LCKK. */
|
reg32 = GPIO_LCKR(gpioport); /* Read LCKK. */
|
||||||
reg32 = GPIO_LCKR(gpioport); /* Read LCKK again. */
|
reg32 = GPIO_LCKR(gpioport); /* Read LCKK again. */
|
||||||
|
|
||||||
|
/* Tell the compiler the variable is actually used. It will get optimized out anyways. */
|
||||||
|
reg32 = reg32;
|
||||||
|
|
||||||
/* If (reg32 & GPIO_LCKK) is true, the lock is now active. */
|
/* If (reg32 & GPIO_LCKK) is true, the lock is now active. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,5 +135,8 @@ void gpio_port_config_lock(u32 gpioport, u16 gpios)
|
|||||||
reg32 = GPIO_LCKR(gpioport); /* Read LCKK. */
|
reg32 = GPIO_LCKR(gpioport); /* Read LCKK. */
|
||||||
reg32 = GPIO_LCKR(gpioport); /* Read LCKK again. */
|
reg32 = GPIO_LCKR(gpioport); /* Read LCKK again. */
|
||||||
|
|
||||||
|
/* Tell the compiler the variable is actually used. It will get optimized out anyways. */
|
||||||
|
reg32 = reg32;
|
||||||
|
|
||||||
/* If (reg32 & GPIO_LCKK) is true, the lock is now active. */
|
/* If (reg32 & GPIO_LCKK) is true, the lock is now active. */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ u8 nvic_get_irq_enabled(u8 irqn)
|
|||||||
|
|
||||||
void nvic_set_priority(u8 irqn, u8 priority)
|
void nvic_set_priority(u8 irqn, u8 priority)
|
||||||
{
|
{
|
||||||
NVIC_IPR(irqn / 4) |= (priority << ((irqn % 4) * 8));
|
NVIC_IPR(irqn) = priority;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nvic_generate_software_interrupt(u8 irqn)
|
void nvic_generate_software_interrupt(u8 irqn)
|
||||||
|
|||||||
Reference in New Issue
Block a user