stdio.h was included in all HAL files only to provide
definition of NULL symbol
"stdio.h" includes "types.h" which contains some conflicting definitions
with "drivers/cc3000/inc/socket.h"
Current version of HAL drivers optimize IRQ handler by using precalculated
DMA register address and stream bitshift instead of calculating it on every interrupt.
Since we skip call to `HAL_DMA_Init` on reused DMA, fields StreamBaseAddress and StreamIndex
of DMA handle are not initialized and thus leads to SegFault in `DMA_IRQHandler`.
HAL_DMA_Init is a big routine and we do not need to call it on each use of DMA
(ex.: series of I2C operations) and DMA_CalcBaseAndBitshift is really small and
releasing it increases code size by only 8 bytes.
Previous to this patch the DMA was setup and then the I2C address sent.
If the I2C address sending failed (eg no I2C device on the bus) then the
DMA was left in an inconsistent state.
This patch moves the DMA setup to after a successful sending of the I2C
address(es).
See issue #1765.
This is in preparation for supporting other MCU series, such as
STM32F2xx. Directory structure for the HAL is now hal/f4/{inc,src},
where "f4" will in the future be different for other series.
HAL source/header files that are not use are removed to reduce the size
of the code.