aperles

process out

Nov 26th, 2013
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. /*
  2.  *
  3.  *@file process.cpp
  4.  **/
  5.  
  6. #include <stdint.h>
  7. #include "process.h"
  8.  
  9. enum TStatusValve {VALVE_OPENNED, VALVE_CLOSED};
  10.  
  11. #define OUT_REGISTER 0XFEAFEO  // a sample register address
  12.  
  13. uint32_t mirror_digital_output;
  14.  
  15. void process_Init(void) {
  16.    
  17.     mirror_digital_output = 0x0000;
  18.     out(OUT_REGISTER, mirror_digital_output);  
  19. }
  20.  
  21.  
  22.  
  23. void process_WriteActuatorValve(TStatusValve status) {
  24.     // "1" means open
  25.     // "0" means closed
  26.     // bit for valve is bit 6
  27.    
  28.     // modify teh mirrror according "status" variable
  29.    
  30.     // put the mirror in the out() register
  31.    
  32.    
  33. }
Advertisement
Add Comment
Please, Sign In to add comment