hal: avoid usage of extern functions and tables

If there is any difference in the signature of a function declared
as extern, it will not be reported by the compiler and may result
in unexpected results when executed.
All the API functions should be declared in a header file.

Change-Id: I89662e23da8118c3a9eac728b389498ed52e19c2
4 files changed