Fixes a null pointer dereference in the procotol message queue.

The base case of the addition of a control message to the queue was
incorrect hence resulting in a null pointer dereference.
Check the validity of the channel number.

The validity of the channel number's type was not checked whatsoever.
This resulted in invalid channels being parsed as valid ones. This
patch performs the basic check that the channel is of an integer type.
Adds the new firmware's protocol stack.

This patch adds the new firmware's protocol stack. That is the functions
and macros interfacing the firmware to the client with the protocol used
to talk on UART.
Removes the old firmware's protocol stack;

The old firmware's protocol stack is now deprecated. This patch removes
it.
Fixes a typo in a comment.

This patch fixes a typo in a comment of the input unit.
Adds the ping command.

This adds a ping commands which may help debugging the UART
communication.
Changes the usage summary.

The usage summary was not correct and suggested that the baud rate was
mandatory which is not the case.
Wait for the child within the ping command.

When using the count option, the ping command did not wait for his child
and let it run in the background. This patch fixes this by adding the
necessary wait.
Fixes an off-by-one error with the new protocol.

A possible off-by-one error was found in the firmware side of the
protocol when using zero-terminated string.
Closes the file descriptors correctly on user interruption.

When the user interrupted the program the file descriptor associated to
UART was not reset correctly. Hence resulting in the firmware not being
reset. This patch fixes this by closing the file descriptor in the
cleanup hook.
Fixes an off-by-one.

The protocol preparsing function did not decrement the size correctly.
This resulted in one supplementary byte being read and interpreted from
the data.
Flush UART on opening.

Some operating systems (eg Linux) bufferise the UART input even when the
file descriptor is not opened. This may be useful in a lot of cases.
However we may be in a case where incomplete messages still lay on the
UART buffer. Therefore we have to flush the buffer ourself.
Fixes a typo.

This patches fixes a typo in a comment of the uart unit.
Moves the buffer flush after serial setup.

The flush of the serial buffer was placed before the configuration and
check of the serial line. This could fail if the line was not correctly
setup before.
Wait for the firmware to be ready.

This adds support to wait for the firmware to be ready before starting
transmissions and operations. We achieve this with a first ready byte
that is send by the firmware when the protocol is set up and ready to
receive data. The client associate a timeout to this ready byte and
wait for it. Only once the open procesure has read the ready byte he
will return control to the client.
Adds the ready byte and timeout to the protocol header.

The ready byte and timeout constant were not included in the protocol
header. This patch adds them.
Adds the extra protocol function for the firmware.

The extra protocol functions are functions provided for the firmware
which depend on the standard library. That is why they are optional
and provided in a separate file.
Fixes the frame size parsing.

The frame size was not parsed correctly when receiving a new frame. This
patch fixes this and compute the correct size.
Fixes crc32 calculation.

The crc32 function used an unsigned long to perform its calculation.
This worked well on a 32bits architectures but resulted in different
results with 64bits architectures. We now use the uin32_t type instead
to guarantee that the register used for calculation is 32bits wide.
Uses a default interval between ping requests.

This patch adds a default interval of one second between ping
requests.