mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-04-05 14:37:02 +00:00
NXDN first cut, not working yet.
This commit is contained in:
parent
78a51d416d
commit
b5ca5e3839
16 changed files with 1005 additions and 23 deletions
67
IOSTM.cpp
67
IOSTM.cpp
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* Copyright (C) 2016 by Jim McLaughlin KI6ZUM
|
||||
* Copyright (C) 2016, 2017 by Andy Uribe CA6JAU
|
||||
* Copyright (C) 2017 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2017,2018 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -37,6 +37,7 @@ DSTAR PD12 output P1 Pin44
|
|||
DMR PD13 output P1 Pin45
|
||||
YSF PD14 output P1 Pin46
|
||||
P25 PD11 output P1 Pin43
|
||||
NXDN PD10 output P1 Pin42
|
||||
|
||||
RX PA0 analog input P1 Pin12
|
||||
RSSI PA1 analog input P1 Pin11
|
||||
|
|
@ -65,6 +66,10 @@ EXT_CLK PA15 input P2 Pin40
|
|||
#define PORT_P25 GPIOD
|
||||
#define RCC_Per_P25 RCC_AHB1Periph_GPIOD
|
||||
|
||||
#define PIN_NXDN GPIO_Pin_10
|
||||
#define PORT_NXDN GPIOD
|
||||
#define RCC_Per_NXDN RCC_AHB1Periph_GPIOD
|
||||
|
||||
#define PIN_DSTAR GPIO_Pin_12
|
||||
#define PORT_DSTAR GPIOD
|
||||
#define RCC_Per_DSTAR RCC_AHB1Periph_GPIOD
|
||||
|
|
@ -107,6 +112,7 @@ DSTAR PC7 output
|
|||
DMR PC8 output
|
||||
YSF PA8 output
|
||||
P25 PC9 output
|
||||
P25 PC10 output
|
||||
|
||||
RX PA0 analog input
|
||||
RSSI PA7 analog input
|
||||
|
|
@ -135,6 +141,10 @@ EXT_CLK PA15 input
|
|||
#define PORT_P25 GPIOC
|
||||
#define RCC_Per_P25 RCC_AHB1Periph_GPIOC
|
||||
|
||||
#define PIN_P25 GPIO_Pin_10
|
||||
#define PORT_P25 GPIOC
|
||||
#define RCC_Per_P25 RCC_AHB1Periph_GPIOC
|
||||
|
||||
#define PIN_DSTAR GPIO_Pin_7
|
||||
#define PORT_DSTAR GPIOC
|
||||
#define RCC_Per_DSTAR RCC_AHB1Periph_GPIOC
|
||||
|
|
@ -177,6 +187,7 @@ DSTAR PC7 output
|
|||
DMR PC8 output
|
||||
YSF PA8 output
|
||||
P25 PC9 output
|
||||
NXDN PC10 output
|
||||
|
||||
RX PA0 analog input
|
||||
RSSI PA7 analog input
|
||||
|
|
@ -205,6 +216,10 @@ EXT_CLK PA15 input
|
|||
#define PORT_P25 GPIOC
|
||||
#define RCC_Per_P25 RCC_AHB1Periph_GPIOC
|
||||
|
||||
#define PIN_NXDN GPIO_Pin_10
|
||||
#define PORT_NXDN GPIOC
|
||||
#define RCC_Per_NXDN RCC_AHB1Periph_GPIOC
|
||||
|
||||
#define PIN_DSTAR GPIO_Pin_7
|
||||
#define PORT_DSTAR GPIOC
|
||||
#define RCC_Per_DSTAR RCC_AHB1Periph_GPIOC
|
||||
|
|
@ -247,6 +262,7 @@ DSTAR PC7 output
|
|||
DMR PC8 output
|
||||
YSF PA8 output
|
||||
P25 PC9 output
|
||||
NXDN PC10 output
|
||||
|
||||
RX PA0 analog input
|
||||
RSSI PA7 analog input
|
||||
|
|
@ -275,6 +291,10 @@ EXT_CLK PA15 input
|
|||
#define PORT_P25 GPIOC
|
||||
#define RCC_Per_P25 RCC_AHB1Periph_GPIOC
|
||||
|
||||
#define PIN_NXDN GPIO_Pin_10
|
||||
#define PORT_NXDN GPIOC
|
||||
#define RCC_Per_NXDN RCC_AHB1Periph_GPIOC
|
||||
|
||||
#define PIN_DSTAR GPIO_Pin_7
|
||||
#define PORT_DSTAR GPIOC
|
||||
#define RCC_Per_DSTAR RCC_AHB1Periph_GPIOC
|
||||
|
|
@ -319,11 +339,13 @@ DSTAR PB10 output CN10 Pin25
|
|||
DMR PB4 output CN10 Pin27
|
||||
YSF PB5 output CN10 Pin29
|
||||
P25 PB3 output CN10 Pin31
|
||||
NXDN PB2 output CN10 Pin32
|
||||
|
||||
MDSTAR PC4 output CN10 Pin34
|
||||
MDMR PC5 output CN10 Pin6
|
||||
MYSF PC2 output CN7 Pin35
|
||||
MP25 PC3 output CN7 Pin37
|
||||
MNXDN PC6 output CN10 Pin??
|
||||
|
||||
RX PA0 analog input CN7 Pin28
|
||||
RSSI PA1 analog input CN7 Pin30
|
||||
|
|
@ -352,6 +374,10 @@ EXT_CLK PA15 input CN7 Pin17
|
|||
#define PORT_P25 GPIOB
|
||||
#define RCC_Per_P25 RCC_AHB1Periph_GPIOB
|
||||
|
||||
#define PIN_NXDN GPIO_Pin_2
|
||||
#define PORT_NXDN GPIOB
|
||||
#define RCC_Per_NXDN RCC_AHB1Periph_GPIOB
|
||||
|
||||
#define PIN_DSTAR GPIO_Pin_10
|
||||
#define PORT_DSTAR GPIOB
|
||||
#define RCC_Per_DSTAR RCC_AHB1Periph_GPIOB
|
||||
|
|
@ -369,6 +395,10 @@ EXT_CLK PA15 input CN7 Pin17
|
|||
#define PORT_MP25 GPIOC
|
||||
#define RCC_Per_MP25 RCC_AHB1Periph_GPIOC
|
||||
|
||||
#define PIN_MNXDN GPIO_Pin_1
|
||||
#define PORT_MNXDN GPIOC
|
||||
#define RCC_Per_MNXDN RCC_AHB1Periph_GPIOC
|
||||
|
||||
#define PIN_MDSTAR GPIO_Pin_4
|
||||
#define PORT_MDSTAR GPIOC
|
||||
#define RCC_Per_MDSTAR RCC_AHB1Periph_GPIOC
|
||||
|
|
@ -412,6 +442,7 @@ DSTAR PA1 output CN8 Pin2
|
|||
DMR PA4 output CN8 Pin3
|
||||
YSF PB0 output CN8 Pin4
|
||||
P25 PC1 output CN8 Pin5
|
||||
NXDN PC? output CN8 Pin6
|
||||
|
||||
RX PA0 analog input CN8 Pin1
|
||||
RSSI PC0 analog input CN8 Pin6
|
||||
|
|
@ -440,6 +471,10 @@ EXT_CLK PB8 input CN5 Pin10
|
|||
#define PORT_P25 GPIOC
|
||||
#define RCC_Per_P25 RCC_AHB1Periph_GPIOC
|
||||
|
||||
#define PIN_NXDN GPIO_Pin_6
|
||||
#define PORT_NXDN GPIOC
|
||||
#define RCC_Per_NXDN RCC_AHB1Periph_GPIOC
|
||||
|
||||
#define PIN_DSTAR GPIO_Pin_1
|
||||
#define PORT_DSTAR GPIOA
|
||||
#define RCC_Per_DSTAR RCC_AHB1Periph_GPIOA
|
||||
|
|
@ -486,11 +521,13 @@ DSTAR PB10 output CN12 Pin25
|
|||
DMR PB4 output CN12 Pin27
|
||||
YSF PB5 output CN12 Pin29
|
||||
P25 PB3 output CN12 Pin31
|
||||
NXDN PB2 output CN12 Pin32
|
||||
|
||||
MDSTAR PC4 output CN12 Pin34
|
||||
MDMR PC5 output CN12 Pin6
|
||||
MYSF PC2 output CN11 Pin35
|
||||
MP25 PC3 output CN11 Pin37
|
||||
MNXDN PC6 output CN11 Pin??
|
||||
|
||||
RX PA0 analog input CN11 Pin28
|
||||
RSSI PA1 analog input CN11 Pin30
|
||||
|
|
@ -519,6 +556,10 @@ EXT_CLK PA15 input CN11 Pin17
|
|||
#define PORT_P25 GPIOB
|
||||
#define RCC_Per_P25 RCC_AHB1Periph_GPIOB
|
||||
|
||||
#define PIN_NXDN GPIO_Pin_2
|
||||
#define PORT_NXDN GPIOB
|
||||
#define RCC_Per_NXDN RCC_AHB1Periph_GPIOB
|
||||
|
||||
#define PIN_DSTAR GPIO_Pin_10
|
||||
#define PORT_DSTAR GPIOB
|
||||
#define RCC_Per_DSTAR RCC_AHB1Periph_GPIOB
|
||||
|
|
@ -536,6 +577,10 @@ EXT_CLK PA15 input CN11 Pin17
|
|||
#define PORT_MP25 GPIOC
|
||||
#define RCC_Per_MP25 RCC_AHB1Periph_GPIOC
|
||||
|
||||
#define PIN_MNXDN GPIO_Pin_6
|
||||
#define PORT_MNXDN GPIOC
|
||||
#define RCC_Per_MNXDN RCC_AHB1Periph_GPIOC
|
||||
|
||||
#define PIN_MDSTAR GPIO_Pin_4
|
||||
#define PORT_MDSTAR GPIOC
|
||||
#define RCC_Per_MDSTAR RCC_AHB1Periph_GPIOC
|
||||
|
|
@ -640,6 +685,12 @@ void CIO::initInt()
|
|||
GPIO_InitStruct.GPIO_Pin = PIN_P25;
|
||||
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT;
|
||||
GPIO_Init(PORT_P25, &GPIO_InitStruct);
|
||||
|
||||
// NXDN pin
|
||||
RCC_AHB1PeriphClockCmd(RCC_Per_NXDN, ENABLE);
|
||||
GPIO_InitStruct.GPIO_Pin = PIN_NXDN;
|
||||
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT;
|
||||
GPIO_Init(PORT_NXDN, &GPIO_InitStruct);
|
||||
#endif
|
||||
|
||||
#if defined(STM32F4_NUCLEO_MODE_PINS) && defined(STM32F4_NUCLEO_MORPHO_HEADER) && defined(STM32F4_NUCLEO)
|
||||
|
|
@ -666,6 +717,12 @@ void CIO::initInt()
|
|||
GPIO_InitStruct.GPIO_Pin = PIN_MP25;
|
||||
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT;
|
||||
GPIO_Init(PORT_MP25, &GPIO_InitStruct);
|
||||
|
||||
// NXDN mode pin
|
||||
RCC_AHB1PeriphClockCmd(RCC_Per_MNXDN, ENABLE);
|
||||
GPIO_InitStruct.GPIO_Pin = PIN_MNXDN;
|
||||
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT;
|
||||
GPIO_Init(PORT_MNXDN, &GPIO_InitStruct);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -905,6 +962,14 @@ void CIO::setP25Int(bool on)
|
|||
#endif
|
||||
}
|
||||
|
||||
void CIO::setNXDNInt(bool on)
|
||||
{
|
||||
GPIO_WriteBit(PORT_NXDN, PIN_NXDN, on ? Bit_SET : Bit_RESET);
|
||||
#if defined(STM32F4_NUCLEO_MODE_PINS) && defined(STM32F4_NUCLEO_MORPHO_HEADER) && defined(STM32F4_NUCLEO)
|
||||
GPIO_WriteBit(PORT_MNXDN, PIN_MNXDN, on ? Bit_SET : Bit_RESET);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Simple delay function for STM32
|
||||
// Example from: http://thehackerworkshop.com/?p=1209
|
||||
void CIO::delayInt(unsigned int dly)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue