Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uint8_t AD8555_SendPacket(uint8_t Mode,uint8_t Function,uint8_t Value)
- {
- // Do not accept Program Mode. It requires 5V supply and fuses cannot be changed if we make any mistake!!!
- if(Mode != AD8555_READ && Mode != AD8555_CHANGE_SENSE_CURRENT && Mode != AD8555_SIMULATE)
- {
- return 0;
- }
- else if(Function != AD8555_SSG_CODE
- && Function != AD8555_FSG_CODE
- && Function != AD8555_OFS_CODE
- && Function != AD8555_OTHER)
- {
- return 0;
- }
- AD8555_StartFrame();
- AD8555_SendParameter(Mode);
- AD8555_SendParameter(Function);
- AD8555_BitSend(1); // Dummy
- AD8555_BitSend(0); // Dummy
- AD8555_ParameterValue(Value);
- AD8555_StopFrame();
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement