Re: Real-time OS system state captured by ATS language (and questions)

2016-06-18 Thread gmhwxi
I do not understand this question. Why can't you define vtfunc_t as follows: typedef vtfunc_t = (!chss(chss_isr) | ptr) -> void On Saturday, June 18, 2016 at 6:48:48 AM UTC-4, Kiwamu Okabe wrote: > > Hi Hongwei, > > I have the other question. Following code has `chVTSetI` function: > > >

Re: Real-time OS system state captured by ATS language (and questions)

2016-06-18 Thread gmhwxi
What you need can be captured in ATS as follows: (* ** ** *) // dataprop chss_p(int) = {s:int | s <= 7} CHSS(s) of () // (* ** ** *) // abst@ype event_source_t // extern fun chEvtObjectInit {s:int} (!chss(s), chss_p(s) | cPtr0(event_source_t)): void = "mac#" // (* **

Re: Real-time OS system state captured by ATS language (and questions)

2016-06-18 Thread Kiwamu Okabe
Hi Hongwei, I have the other question. Following code has `chVTSetI` function: https://github.com/fpiot/chibios-ats-2/blob/720847a31b9417ee267a34bf1746802e916ce03b/demos/STM32/RT-STM32F746G-DISCOVERY-LWIP-FATFS-USB/main.dats#L84 The `chVTSetI` function has following type: ``` typedef vtfunc_t