initial commit

This commit is contained in:
tkl
2016-07-28 21:02:54 +02:00
commit 8b47a2b3e6
424 changed files with 175707 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
/*
* stm32f4xx_ctx.h
*
* Created on: Oct 1, 2015
* Author: tkl
*/
#ifndef STM32F4XX_CTX_H_
#define STM32F4XX_CTX_H_
void start_first_task(void);
void arch_schedule(void);
#define restore_context() { enable_irq(); start_first_task(); }
#endif /* STM32F4XX_CTX_H_ */

View File

@@ -0,0 +1,15 @@
/*
* stm32f4xx_irq.h
*
* Created on: Oct 1, 2015
* Author: tkl
*/
#ifndef STM32F4XX_IRQ_H_
#define STM32F4XX_IRQ_H_
unsigned int disable_irq(void);
unsigned int enable_irq(void);
void restore_irq(unsigned int state);
#endif /* STM32F4XX_IRQ_H_ */

View File

@@ -0,0 +1,14 @@
/*
* stm32f4xx_isr.h
*
* Created on: Sep 25, 2015
* Author: tkl
*/
#ifndef STM32F4XX_ISR_H_
#define STM32F4XX_ISR_H_
void enter_isr(void);
void exit_isr(void);
#endif /* STM32F4XX_ISR_H_ */

View File

@@ -0,0 +1,15 @@
/*
* stm32f4xx_low_power.h
*
* Created on: Oct 1, 2015
* Author: tkl
*/
#ifndef STM32F4XX_LOW_POWER_H_
#define STM32F4XX_LOW_POWER_H_
/* TODO: real implement!!! */
#define enter_low_power()
#define exit_low_power()
#endif /* STM32F4XX_LOW_POWER_H_ */

View File

@@ -0,0 +1,21 @@
/*
* stm32f4xx_stack.h
*
* Created on: Oct 1, 2015
* Author: tkl
*/
#ifndef STM32F4XX_STACK_H_
#define STM32F4XX_STACK_H_
#include <stdint.h>
typedef uint32_t stack_t;
stack_t *stack_init(
void (*task_func)(void *),
void *arg,
stack_t *stack_start,
unsigned int stack_size);
#endif /* STM32F4XX_STACK_H_ */