Always notify OS of SCI when pmc_sci is called

This commit is contained in:
Jeremy Soller
2021-02-26 08:09:40 -07:00
committed by Jeremy Soller
parent 4cd4df03e8
commit 67e143178d

View File

@@ -53,16 +53,15 @@ static void pmc_sci_interrupt(void) {
}
bool pmc_sci(struct Pmc * pmc, uint8_t sci) {
// Set SCI queue if possible
// Set SCI pending bit
pmc_set_status(pmc, pmc_status(pmc) | (1 << 5));
// Send SCI
pmc_sci_interrupt();
// Set SCI queue if not already set
if (pmc_sci_queue == 0) {
pmc_sci_queue = sci;
// Set SCI pending bit
pmc_set_status(pmc, pmc_status(pmc) | (1 << 5));
// Send SCI
pmc_sci_interrupt();
return true;
} else {
return false;