Re: Questions about low level programming.
- From: jcupitt gmail com
- To: "Diego Jacobi" <jacobidiego gmail com>
- Cc: gtk-list gnome org
- Subject: Re: Questions about low level programming.
- Date: Mon, 31 Mar 2008 17:09:16 +0100
On 29/03/2008, Diego Jacobi <jacobidiego gmail com> wrote:
> Those device are mostly programmed in assembler and or C/C++.
> Just to say some of this devices are 8085, 8086, freescale(motorola)
> microcontrollers, etc.
>
> We have to use them to manually build a computer model and this includes
> programming an OS to accomplish certain tasks. Of course, it wont be a
> linux, and it wont fit inside those roms.
>
> But i was thinking on the possibility to use glib to make it much easier to
> build this OS and handle whatever data is required by the electronic
> project.
I've done projects like this (though I think we used a 68000).
I'm not sure there's much of glib you can directly reuse. I would
copy-paste basic things like the data structure code (hash table,
linked list, etc.), but the rest, particularly the main loop and the
event system, I think will not be very useful.
> If i need a rutine to turn on a pin or to write a word to a port
> sincronously (like turn on/off a LED every 2 seconds) i have to take into
> account the amount of clocks in the routine wasting a lot of processing time
> doing lots of sleep(..), if i use timeout_add it will be much more
> efficient. But in some cases an sleep like routine is required on this kind
> of processes, i dont know why there isnt one on glib to be able to do a
> sleep and pause a function execution but continue doing MainLoop stuff and
> not break the event system.
Sorry, no. Make your own tiny event system. You only need something
very simple, you could do it in less than 100 lines of code. I guess
you have a timer on the board somewhere?
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]