Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Revision 67:c44c5c90e35a, committed 2019-09-27
- Comitter:
- andrewboyson
- Date:
- Fri Sep 27 11:29:57 2019 +0000
- Parent:
- 66:466803ec48d0
- Child:
- 68:807c1c7b2c22
- Commit message:
- Changed __disable_irq and __enable_irq to equivalent in line asm
Changed in this revision
| clk/clktime.c | Show annotated file Show diff for this revision Revisions of this file |
| clk/clkutc.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/clk/clktime.c Mon May 27 10:10:40 2019 +0000
+++ b/clk/clktime.c Fri Sep 27 11:29:57 2019 +0000
@@ -29,21 +29,25 @@
clktime fraction = (timerCountSinceLastSecond << CLK_TIME_ONE_SECOND_SHIFT) / HR_TIMER_COUNT_PER_SECOND;
clktime ticks = extClock - fraction;
- __disable_irq();
+ //__disable_irq();
+ __asm("CPSID I");
tickCount = ticks;
slewCount = 0;
- __enable_irq();
+ //__enable_irq();
+ __asm("CPSIE I");
countIsSet = true;
}
void ClkTimeIncrementByOneSecond(uint32_t startCount)
{
- __disable_irq();
+ //__disable_irq();
+ __asm("CPSID I");
hrTimerAtLastIncrement = startCount;
tickCount += CLK_TIME_ONE_SECOND + ClkGovGetPpb();
slewCount += ClkGovGetSlew();
ClkGovSetSlew(0);
- __enable_irq();
+ //__enable_irq();
+ __asm("CPSIE I");
}
static volatile clktime tickSnapshot;
--- a/clk/clkutc.c Mon May 27 10:10:40 2019 +0000
+++ b/clk/clkutc.c Fri Sep 27 11:29:57 2019 +0000
@@ -29,7 +29,7 @@
{
epochOffset = value;
epochOffset64 = (clktime)epochOffset << CLK_TIME_ONE_SECOND_SHIFT;
- GPREG1 = GPREG1 & 0xFFFF0000 | value & 0x0000FFFF;
+ GPREG1 = (GPREG1 & 0xFFFF0000) | (value & 0x0000FFFF);
}
void ClkUtcAddEpochOffset(int value)
{
@@ -54,7 +54,7 @@
{
nextEpochMonth1970 = value;
makeNextEpochUtc();
- GPREG1 = GPREG1 & 0xF000FFFF | (uint32_t)value << 16 & 0x0FFF0000; //Precedence order: shifts then ands then ors.
+ GPREG1 = (GPREG1 & 0xF000FFFF) | (((uint32_t)value << 16) & 0x0FFF0000); //Precedence order: shifts then ands then ors.
}
static bool nextLeapEnable = false;