chip_info.c 761 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * SPDX-FileCopyrightText: 2013-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #include <string.h>
  7. #include "esp_chip_info.h"
  8. #include "esp_mac.h"
  9. void esp_chip_info(esp_chip_info_t *out_info)
  10. {
  11. memset(out_info, 0, sizeof(*out_info));
  12. out_info->model = CHIP_POSIX_LINUX;
  13. // TODO: May need to adjust once networking becomes available on POSIX/Linux
  14. out_info->features = 0;
  15. out_info->revision = 0;
  16. out_info->cores = 1;
  17. }
  18. esp_err_t esp_read_mac(uint8_t *mac, esp_mac_type_t type)
  19. {
  20. // Provide Locally Administered (OUI range) MAC address on POSIX/Linux
  21. mac[0] = 0x02;
  22. mac[1] = 0x12;
  23. mac[2] = 0x34;
  24. mac[3] = 0x56;
  25. mac[4] = 0x78;
  26. mac[5] = 0xab;
  27. return ESP_OK;
  28. }