tool.c 941 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include "tool.h"
  2. char JS_RTT_UpBuffer[4096]; // J-Scope RTT Buffer
  3. int JS_RTT_Channel = 1; // J-Scope RTT Channel
  4. acValBuffer_t acValBuffer;
  5. void JS_RTT_Init(void)
  6. {
  7. SEGGER_RTT_ConfigUpBuffer(JS_RTT_Channel, "JScope_I4I4I4I4I4I4", &JS_RTT_UpBuffer[0], sizeof(JS_RTT_UpBuffer), SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL);
  8. }
  9. void JS_RTT_Print(signed int Sine1,signed int Sine2,signed int Sine3)
  10. {
  11. acValBuffer.Sine1 = Sine1;
  12. acValBuffer.Sine2 = Sine2;
  13. acValBuffer.Sine3 = Sine3;
  14. SEGGER_RTT_Write(JS_RTT_Channel, &acValBuffer, sizeof(acValBuffer));
  15. }
  16. void JS_RTT_Print_06(signed int Sine1,signed int Sine2,signed int Sine3,signed int Sine4,signed int Sine5,signed int Sine6)
  17. {
  18. acValBuffer.Sine1 = Sine1;
  19. acValBuffer.Sine2 = Sine2;
  20. acValBuffer.Sine3 = Sine3;
  21. acValBuffer.Sine4 = Sine4;
  22. acValBuffer.Sine5 = Sine5;
  23. acValBuffer.Sine6 = Sine6;
  24. SEGGER_RTT_Write(JS_RTT_Channel, &acValBuffer, sizeof(acValBuffer));
  25. }