Cannot include <stdint.h> , Eclipse ESP-IDF

Hailwiz9
Posts: 4
Joined: Fri Mar 18, 2022 9:20 pm

Cannot include <stdint.h> , Eclipse ESP-IDF

Postby Hailwiz9 » Fri Mar 18, 2022 9:47 pm

Hello,

I have used arduino before and I can be said to be a beginner in terms of C, C++
I wanted to learn more in-depth coding by diving into the ESP-IDF environment, I'm using Eclipse IDE,
I'm trying to convert the DMD32 library which was written for arduino to be used in ESP-IDF but got stuck at some type declarations.
I can't seem to include "uint8_t" into the C type Header file,
I've figured if I included <stdint.h> it would work but the IDE can't seem to find the library.

I don't know if this problem is with the Eclipse IDE or I'm doing something wrong with file types or such, tried to find Path options in Eclipse IDE but can't seem to find it.

Example code is given below, and the Eclipse IDE response can be seen in the attachment picture

Thanks for your help,
  1. [Codebox] ---
  2. */
  3. #pragma once
  4.  
  5. #ifndef MAIN_DMD32_H_
  6. #define MAIN_DMD32_H_
  7.  
  8. #include <stdint.h>
  9.  
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13.  
  14. //drawTestPattern Patterns2
  15. #define PATTERN_ALT_0   0
  16. #define PATTERN_ALT_1   1
  17. #define PATTERN_STRIPE_0    2
  18. #define PATTERN_STRIPE_1    3
  19.  
  20. //display screen (and subscreen) sizing
  21. #define DMD_PIXELS_ACROSS   32      //pixels across x axis (base 2 size expected)
  22. #define DMD_PIXELS_DOWN 16      //pixels down y axis
  23. #define DMD_BITSPERPIXEL        1      //1 bit per pixel, use more bits to allow for pwm screen brightness control
  24. #define DMD_RAM_SIZE_BYTES  ((DMD_PIXELS_ACROSS*DMD_BITSPERPIXEL/8)*DMD_PIXELS_DOWN)
  25.                                   // (32x * 1 / 8) = 4 bytes, * 16y = 64 bytes per screen here.
  26. //lookup table for DMD::writePixel to make the pixel indexing routine faster
  27. static uint8_t bPixelLookupTable[8] =
  28. {
  29.    0x80,   //0, bit 7
  30.    0x40,   //1, bit 6
  31.    0x20,   //2. bit 5
  32.    0x10,   //3, bit 4
  33.    0x08,   //4, bit 3
  34.    0x04,   //5, bit 2
  35.    0x02,   //6, bit 1
  36.    0x01    //7, bit 0
  37. };
Attachments
DMDImg.png
DMDImg.png (110.65 KiB) Viewed 1824 times
DMD32.cpp
(7.06 KiB) Downloaded 182 times

Who is online

Users browsing this forum: No registered users and 102 guests