Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define DHT11_PIN 7
- #define DHT11_PORT C
- #define DHT11_PARSE(port,pin) AS_STRING(P ## port ## pin)
- #define DHT11_EVAL(port,pin) DHT11_PARSE(port,pin)
- #define DHT11_STRING DHT11_EVAL(DHT11_PORT,DHT11_PIN)
- #define AS_STRING( s ) # s
- void show(const char* s){
- printf("%s\n", s);
- }
- int main()
- {
- printf("%s\n", DHT11_STRING);
- show(DHT11_STRING);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment