functions.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 FUNCTIONS_H
  17. #define FUNCTIONS_H
  18. #include <stdint.h>
  19. enum FUNCTION_Type_t
  20. {
  21. FUNCTION_FOREGROUND = 0, // ???
  22. FUNCTION_TRANSMIT, // transmitting
  23. FUNCTION_MONITOR, // receiving with squelch forced open
  24. FUNCTION_INCOMING, // receiving a signal (squelch is open)
  25. FUNCTION_RECEIVE, // RX mode, squelch closed
  26. FUNCTION_POWER_SAVE, // sleeping
  27. FUNCTION_BAND_SCOPE, // bandscope mode (panadpter/spectrum) .. not yet implemented
  28. FUNCTION_N_ELEM
  29. };
  30. typedef enum FUNCTION_Type_t FUNCTION_Type_t;
  31. extern FUNCTION_Type_t gCurrentFunction;
  32. void FUNCTION_Init(void);
  33. void FUNCTION_Select(FUNCTION_Type_t Function);
  34. bool FUNCTION_IsRx();
  35. #endif