diff --git a/source/os/debug/include/board_devices.h b/source/os/debug/include/board_devices.h index 78fc2e8..caf7c12 100644 --- a/source/os/debug/include/board_devices.h +++ b/source/os/debug/include/board_devices.h @@ -3,6 +3,7 @@ #ifndef BOARD_DEVICES_H #define BOARD_DEVICES_H +extern const struct driver gpio_d12; extern const struct driver pwm_4; extern const struct driver pwm_3; extern const struct driver pwm_2; diff --git a/source/os/debug/include/driver.h b/source/os/debug/include/driver.h index 14923d9..e91349d 100644 --- a/source/os/debug/include/driver.h +++ b/source/os/debug/include/driver.h @@ -20,15 +20,18 @@ enum driver_type { DRIVER_TYPE_UART }; +#pragma pack(push) +#pragma pack(1) struct driver { enum driver_type driver_type; const void *device_driver; }; +#pragma pack(pop) -int open(const struct driver *driver); -int close(const struct driver *driver); -int read(const struct driver *driver, char *buffer, int len); -int write(const struct driver *driver, const char *buffer, int len); -int ioctl(const struct driver *driver, unsigned int cmd, const void *data); +int drv_open(const struct driver *driver); +int drv_close(const struct driver *driver); +int drv_read(const struct driver *driver, char *buffer, int len); +int drv_write(const struct driver *driver, const char *buffer, int len); +int drv_ioctl(const struct driver *driver, unsigned int cmd, const void *data); #endif /* SOURCE_FIRMWARE_KERNEL_DRIVER_INCLUDE_DRIVER_H_ */ diff --git a/source/os/debug/include/kernel.h b/source/os/debug/include/kernel.h index b9d4520..e69f607 100644 --- a/source/os/debug/include/kernel.h +++ b/source/os/debug/include/kernel.h @@ -25,6 +25,8 @@ enum thread_status { THREAD_STATUS_BLOCKING }; +#pragma pack(push) +#pragma pack(1) struct thread_context { stack_t *sp; /**< thread's stack pointer */ stack_t *stack; /**< thread's stack start address */ @@ -36,6 +38,16 @@ struct thread_context { void *wakeup_blocking_source; struct queue_node sem_queue_node; }; +#pragma pack(pop) + +struct kernel_version { + unsigned int kernel_version; + unsigned int major_version; + unsigned int minor_version; + unsigned int build_number; +}; + +int get_kernel_version(struct kernel_version *version); struct thread_context *thread_create( struct thread_context *thread, @@ -45,6 +57,7 @@ struct thread_context *thread_create( void *arg, enum thread_priority priority); + void thread_exit(void); void sleep_ms(unsigned int ms); diff --git a/source/os/debug/libkosmos-arm-stm32f4-discovery-0.0.5-dbg.a b/source/os/debug/libkosmos-arm-stm32f4-discovery-0.0.5-dbg.a deleted file mode 100644 index 3620324..0000000 Binary files a/source/os/debug/libkosmos-arm-stm32f4-discovery-0.0.5-dbg.a and /dev/null differ diff --git a/source/os/debug/libkosmos-arm-stm32f4-discovery-0.1.0-dbg.a b/source/os/debug/libkosmos-arm-stm32f4-discovery-0.1.0-dbg.a new file mode 100644 index 0000000..0d87fd7 Binary files /dev/null and b/source/os/debug/libkosmos-arm-stm32f4-discovery-0.1.0-dbg.a differ diff --git a/source/os/release/include/board_devices.h b/source/os/release/include/board_devices.h index 78fc2e8..caf7c12 100644 --- a/source/os/release/include/board_devices.h +++ b/source/os/release/include/board_devices.h @@ -3,6 +3,7 @@ #ifndef BOARD_DEVICES_H #define BOARD_DEVICES_H +extern const struct driver gpio_d12; extern const struct driver pwm_4; extern const struct driver pwm_3; extern const struct driver pwm_2; diff --git a/source/os/release/include/driver.h b/source/os/release/include/driver.h index 14923d9..e91349d 100644 --- a/source/os/release/include/driver.h +++ b/source/os/release/include/driver.h @@ -20,15 +20,18 @@ enum driver_type { DRIVER_TYPE_UART }; +#pragma pack(push) +#pragma pack(1) struct driver { enum driver_type driver_type; const void *device_driver; }; +#pragma pack(pop) -int open(const struct driver *driver); -int close(const struct driver *driver); -int read(const struct driver *driver, char *buffer, int len); -int write(const struct driver *driver, const char *buffer, int len); -int ioctl(const struct driver *driver, unsigned int cmd, const void *data); +int drv_open(const struct driver *driver); +int drv_close(const struct driver *driver); +int drv_read(const struct driver *driver, char *buffer, int len); +int drv_write(const struct driver *driver, const char *buffer, int len); +int drv_ioctl(const struct driver *driver, unsigned int cmd, const void *data); #endif /* SOURCE_FIRMWARE_KERNEL_DRIVER_INCLUDE_DRIVER_H_ */ diff --git a/source/os/release/include/kernel.h b/source/os/release/include/kernel.h index b9d4520..e69f607 100644 --- a/source/os/release/include/kernel.h +++ b/source/os/release/include/kernel.h @@ -25,6 +25,8 @@ enum thread_status { THREAD_STATUS_BLOCKING }; +#pragma pack(push) +#pragma pack(1) struct thread_context { stack_t *sp; /**< thread's stack pointer */ stack_t *stack; /**< thread's stack start address */ @@ -36,6 +38,16 @@ struct thread_context { void *wakeup_blocking_source; struct queue_node sem_queue_node; }; +#pragma pack(pop) + +struct kernel_version { + unsigned int kernel_version; + unsigned int major_version; + unsigned int minor_version; + unsigned int build_number; +}; + +int get_kernel_version(struct kernel_version *version); struct thread_context *thread_create( struct thread_context *thread, @@ -45,6 +57,7 @@ struct thread_context *thread_create( void *arg, enum thread_priority priority); + void thread_exit(void); void sleep_ms(unsigned int ms); diff --git a/source/os/release/libkosmos-arm-stm32f4-discovery-0.0.5.a b/source/os/release/libkosmos-arm-stm32f4-discovery-0.0.5.a deleted file mode 100644 index 1f12c56..0000000 Binary files a/source/os/release/libkosmos-arm-stm32f4-discovery-0.0.5.a and /dev/null differ diff --git a/source/os/release/libkosmos-arm-stm32f4-discovery.a b/source/os/release/libkosmos-arm-stm32f4-discovery.a index 08e7161..99e6995 120000 --- a/source/os/release/libkosmos-arm-stm32f4-discovery.a +++ b/source/os/release/libkosmos-arm-stm32f4-discovery.a @@ -1 +1 @@ -libkosmos-arm-stm32f4-discovery-0.0.5.a \ No newline at end of file +libkosmos-arm-stm32f4-discovery-0.1.0.a \ No newline at end of file