projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/cc1111: Leave pin interrupts completely disabled at init time
[fw/altos]
/
src
/
stm
/
ao_arch_funcs.h
diff --git
a/src/stm/ao_arch_funcs.h
b/src/stm/ao_arch_funcs.h
index 2c0f173c3661264a68b7192821370f663a47f010..6fe86e62c4dc5718a6c159d1cb15e8324423488c 100644
(file)
--- a/
src/stm/ao_arch_funcs.h
+++ b/
src/stm/ao_arch_funcs.h
@@
-87,13
+87,16
@@
extern uint16_t ao_spi_speed[STM_NUM_SPI];
void
ao_spi_init(void);
void
ao_spi_init(void);
+#define ao_spi_set_cs(reg,mask) ((reg)->bsrr = ((uint32_t) (mask)) << 16)
+#define ao_spi_clr_cs(reg,mask) ((reg)->bsrr = (mask))
+
#define ao_spi_get_mask(reg,mask,bus, speed) do { \
ao_spi_get(bus, speed); \
#define ao_spi_get_mask(reg,mask,bus, speed) do { \
ao_spi_get(bus, speed); \
-
(reg)->bsrr = ((uint32_t) mask) << 16;
\
+
ao_spi_set_cs(reg,mask);
\
} while (0)
#define ao_spi_put_mask(reg,mask,bus) do { \
} while (0)
#define ao_spi_put_mask(reg,mask,bus) do { \
-
(reg)->bsrr = mask;
\
+
ao_spi_clr_cs(reg,mask);
\
ao_spi_put(bus); \
} while (0)
ao_spi_put(bus); \
} while (0)
@@
-267,6
+270,7
@@
ao_arch_memory_barrier() {
asm volatile("" ::: "memory");
}
asm volatile("" ::: "memory");
}
+#if HAS_TASK
static inline void
ao_arch_init_stack(struct ao_task *task, void *start)
{
static inline void
ao_arch_init_stack(struct ao_task *task, void *start)
{
@@
-349,6
+353,8
@@
static inline void ao_arch_start_scheduler(void) {
#define ao_arch_isr_stack()
#define ao_arch_isr_stack()
+#endif
+
#define ao_arch_wait_interrupt() do { \
asm(".global ao_idle_loc\n\twfi\nao_idle_loc:"); \
ao_arch_release_interrupts(); \
#define ao_arch_wait_interrupt() do { \
asm(".global ao_idle_loc\n\twfi\nao_idle_loc:"); \
ao_arch_release_interrupts(); \