commit.. some changes..

This commit is contained in:
Christian Lind Madsen
2024-11-01 21:56:00 +01:00
parent a368939d88
commit 84d2031e96
5 changed files with 49 additions and 15 deletions

View File

@@ -2,11 +2,47 @@
* cqm6xx_app.c
*
* Created: 21-08-2024 21:12:36
* Author: Chris
* Author: Christian Lind Vie Madsen - OZ1CM
*/
void storno_osc_app_init(){
void cqm6xx_app_statemachine(storno_xtal_app *inst){
switch (inst->state_next)
{
case STORNO_APP_PROGRAM_OSC:
// Program PLL values here:
// if ok, then go to RX mode:
inst->state_next = STORNO_APP_RX_MODE;
break;
case STORNO_APP_RX_MODE:
// If we just came from another state, then Enable RX osc here..
// If PTT is hold, then disable RX osc, and go to STORNO_APP_TX_MODE, to enable tx osc.
break;
case STORNO_APP_TX_MODE:
// If we just came from another state, then Enable TX osc here..
// If PTT is released, then disable TX osc, and go to STORNO_APP_RX_MODE, to enable rx osc.
break;
case STORNO_APP_PROGRAM_OSC:
break;
case STORNO_APP_RST_TO_BOOTLOADER:
break;
}
}
void cqm6xx_app_init(storno_xtal_app *inst){
inst->state_next = STORNO_APP_PROGRAM_OSC;
inst->state_now = STORNO_APP_PROGRAM_OSC;
}

View File

@@ -2,7 +2,7 @@
* cqm6xx_app.h
*
* Created: 21-08-2024 21:12:15
* Author: Chris
* Author: Christian Lind Vie Madsen - OZ1CM
*/
@@ -11,14 +11,12 @@
typedef enum {
STORNO_APP_INIT = 0,
STORNO_APP_START = 1,
STORNO_APP_PROGRAM_OSC = 2,
STORNO_APP_RX_MODE = 3,
STORNO_APP_TX_MODE = 4,
STORNO_APP_PROGRAM_MODE = 5,
STORNO_APP_RST_TO_BOOTLOADER = 6,
STORNO_APP_PROGRAM_OSC = 0,
STORNO_APP_RX_MODE = 1,
STORNO_APP_TX_MODE = 2,
STORNO_APP_PROGRAM_MODE = 3,
STORNO_APP_RST_TO_BOOTLOADER = 4,
}storno_app_states;

View File

@@ -2,7 +2,7 @@
* storno_cqp6xx_digital_xtal.c
*
* Created: 21-08-2024 20:28:13
* Author : Chris
* Author : Christian Lind Vie Madsen - OZ1CM
*/
#include "avr_global_config.h"
#include <avr/io.h>