diff options
author | vetch <vetch97@gmail.com> | 2020-01-04 11:26:57 +0100 |
---|---|---|
committer | vetch <vetch97@gmail.com> | 2020-01-04 11:26:57 +0100 |
commit | 885a097da42317f48cead2d91c0e0240066943a8 (patch) | |
tree | 0ee86dbaf5678b32f496b99c48ea81bbd20971f2 /bcmclock.h | |
parent | 2d31012739a11724844701d07db12e6e1307925e (diff) | |
parent | 814d4a5357d849c4988422d48afa4aaa5432ce78 (diff) | |
download | rpi-MMU-example-885a097da42317f48cead2d91c0e0240066943a8.tar.gz rpi-MMU-example-885a097da42317f48cead2d91c0e0240066943a8.zip |
Merge branch 'bob' of https://repo.or.cz/RPi-MMU-example into alice
# Conflicts:
# demo_functionality.h
# interrupt_vector.S
# interrupts.c
Diffstat (limited to 'bcmclock.h')
-rw-r--r-- | bcmclock.h | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -17,19 +17,19 @@ static inline void bcmclk_enable_timer_irq(void) { - *(uint32_t volatile*) ARM_ENABLE_IRQS_1 = 1 << 3; + wr32(ARM_ENABLE_IRQS_1, 1 << 3); } static inline void bcmclk_disable_timer_irq(void) { - *(uint32_t volatile*) ARM_DISABLE_IRQS_1 = 1 << 3; + wr32(ARM_DISABLE_IRQS_1, 1 << 3); } static inline void bcmclk_irq_settimeout(uint32_t timeout) { - uint32_t clock_now = *(uint32_t volatile*) ST_CLO; - *(uint32_t volatile*) ST_C3 = clock_now + timeout; - *(uint32_t volatile*) ST_CS = 1 << 3; + uint32_t clock_now = rd32(ST_CLO); + wr32(ST_C3, clock_now + timeout); + wr32(ST_CS, 1 << 3); } #endif // BCMCLOCK_H |