Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdint.h>
- #include <string.h>
- #include <windows.h>
- typedef enum
- {
- MAX6675_THREE_STATE = 1<<0,
- MAX6675_ID = 1<<1,
- MAX6675_THERMOCOUPLE_INPUT = 1<<2,
- }max6675_state;
- max6675_state max6675getState( uint8_t in )
- {
- return ( in & ( MAX6675_THREE_STATE | MAX6675_ID ) | MAX6675_THERMOCOUPLE_INPUT );
- }
- int main ()
- {
- uint8_t fuehlerError = 1<<2;
- printf( "%d" , max6675getState( fuehlerError ) );
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement