projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/stm32f4: Add -mfloat-abi=hard compile option
[fw/altos]
/
src
/
stm32f4
/
ao_arch_funcs.h
diff --git
a/src/stm32f4/ao_arch_funcs.h
b/src/stm32f4/ao_arch_funcs.h
index 8c0da03bf37b402bc39826a946b712b2f62942c1..8ff31b4a917620865d3c368b1756cb934edaf1b5 100644
(file)
--- a/
src/stm32f4/ao_arch_funcs.h
+++ b/
src/stm32f4/ao_arch_funcs.h
@@
-84,7
+84,7
@@
ao_arch_irq_check(void) {
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)
{
- uint32_t *sp =
(uint32_t *) ((void*) task->stack + AO_STACK_SIZE)
;
+ uint32_t *sp =
&task->stack32[AO_STACK_SIZE>>2]
;
uint32_t a = (uint32_t) start;
int i;
uint32_t a = (uint32_t) start;
int i;
@@
-110,7
+110,7
@@
ao_arch_init_stack(struct ao_task *task, void *start)
/* BASEPRI with interrupts enabled */
ARM_PUSH32(sp, 0);
/* BASEPRI with interrupts enabled */
ARM_PUSH32(sp, 0);
- task->sp = sp;
+ task->sp
32
= sp;
}
static inline void ao_arch_save_regs(void) {
}
static inline void ao_arch_save_regs(void) {
@@
-142,12
+142,12
@@
static inline void ao_arch_save_regs(void) {
static inline void ao_arch_save_stack(void) {
uint32_t *sp;
asm("mov %0,sp" : "=&r" (sp) );
static inline void ao_arch_save_stack(void) {
uint32_t *sp;
asm("mov %0,sp" : "=&r" (sp) );
- ao_cur_task->sp = (sp);
+ ao_cur_task->sp
32
= (sp);
}
static inline void ao_arch_restore_stack(void) {
/* Switch stacks */
}
static inline void ao_arch_restore_stack(void) {
/* Switch stacks */
- asm("mov sp, %0" : : "r" (ao_cur_task->sp) );
+ asm("mov sp, %0" : : "r" (ao_cur_task->sp
32
) );
#ifdef AO_NONMASK_INTERRUPTS
/* Restore BASEPRI */
#ifdef AO_NONMASK_INTERRUPTS
/* Restore BASEPRI */
@@
-331,4
+331,10
@@
static inline void ao_disable_port(struct stm_gpio *port)
ao_gpio_set_mode(port, bit, mode); \
} while (0)
ao_gpio_set_mode(port, bit, mode); \
} while (0)
+/* usart */
+
+void
+ao_usart_init(void);
+
+
#endif /* _AO_ARCH_FUNCS_H_ */
#endif /* _AO_ARCH_FUNCS_H_ */