Commit graph

4 commits

Author SHA1 Message Date
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
Peter Bigot 82d4fcc1bf drivers: hwinfo: fix ESP32 implementation
Add the missing prefix z_ required to make the ESP32 version override
the weak implementation.

General practice in ESP32 seems to be to use the MAC address, so
extract that in its canonical byte order.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-28 15:32:53 -04:00
Anas Nashif f901e26de9 cleanup: include/: move hwinfo.h to drivers/hwinfo.h
move hwinfo.h to drivers/hwinfo.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Leandro Pereira 05351dbf9d drivers: hwinfo: Add support for ESP32
ESP32 can sport up to 4 network interfaces: two 802.11 (station and
ap), ethernet, and bluetooth.  All of them derive from the same RDATA
register in efuse block 0.  However, in most cases, the last (sixth)
octet will change like so:

  - 802.11 station:  mac[5] += 0
  - 802.11 ap:       mac[5] += 1
  - bluetooth:       mac[5] += 2
  - ethernet:        mac[5] += 3

Read "Number of universally admnistered MAC address" section in esp-idf
documentation[1] for more information.

[1] https://docs.espressif.com/projects/esp-idf/en/latest/

Signed-off-by: Leandro Pereira <leandro@hardinfo.org>
2019-05-30 09:28:50 -04:00