训练营PLSR题目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 rivejä
558 B

  1. #include "Bitset.h"
  2. #include "string.h"
  3. void Set8_16(uint16_t *Dat , uint8_t *BufferH, uint8_t *BufferL)
  4. {
  5. uint16_t temp_dat;
  6. uint8_t temp_BufferH, temp_BufferL;
  7. temp_BufferH = *BufferH;
  8. temp_BufferL = *BufferL;
  9. temp_dat = (temp_BufferH << 8)|temp_BufferL;
  10. memcpy(Dat, &temp_dat, 2);
  11. }
  12. void Set16_32(uint32_t *Dat , uint16_t *BufferH, uint16_t *BufferL)
  13. {
  14. uint32_t temp_dat;
  15. uint16_t temp_BufferH, temp_BufferL;
  16. temp_BufferH = *BufferH;
  17. temp_BufferL = *BufferL;
  18. temp_dat = (temp_BufferH << 16)|temp_BufferL;
  19. memcpy(Dat, &temp_dat, 4);
  20. }