cvra / platform-abstraction

Platform abstraction layer for microcontrollers
3 stars 6 forks source link

uCOS-III mutex implementation #35

Closed msplr closed 10 years ago

msplr commented 10 years ago

I changed the API to static allocation of the mutex (as discussed). I know this breaks the mock implementation and it's tests, but I didn't have the time to look into the detail of the mock. I also did't come to testing it on hardware.

antoinealb commented 10 years ago

I only see two minors issues :

  1. The timeout for os_mutex_try_timeout is in microseconds in the API and in CPU ticks in your implementation.
  2. You should add mutex.c to the package I think.

If you want I can fix the mock and open a PR to your fork ?

msplr commented 10 years ago

1: yes, I need to convert the timeout. I'll change this later. 2: how are the arm files listed in the package? Yes, you can do it if you want.

antoinealb commented 10 years ago

2:

target.arm:
  - ucos3/mutex.c
antoinealb commented 10 years ago

I have a fix for the mutex mocks. You can pull it from https://github.com/antoinealb/platform-abstraction/ there is a branch for it.

msplr commented 10 years ago

Thanks for the fix. I just ran a simple test on hardware and it seems to run correctly.

msplr commented 10 years ago

merge?