dcs.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* Copyright 2023 Dual Tachyon
  2. * https://github.com/DualTachyon
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef DCS_H
  17. #define DCS_H
  18. #include <stdint.h>
  19. enum DCS_CodeType_t
  20. {
  21. CODE_TYPE_OFF = 0,
  22. CODE_TYPE_CONTINUOUS_TONE,
  23. CODE_TYPE_DIGITAL,
  24. CODE_TYPE_REVERSE_DIGITAL
  25. };
  26. typedef enum DCS_CodeType_t DCS_CodeType_t;
  27. enum {
  28. CDCSS_POSITIVE_CODE = 1U,
  29. CDCSS_NEGATIVE_CODE = 2U,
  30. };
  31. extern const uint16_t CTCSS_Options[50];
  32. extern const uint16_t DCS_Options[104];
  33. uint32_t DCS_GetGolayCodeWord(DCS_CodeType_t CodeType, uint8_t Option);
  34. uint8_t DCS_GetCdcssCode(uint32_t Code);
  35. uint8_t DCS_GetCtcssCode(int Code);
  36. #endif