Changed pinning

pull/13/head
ArjanteMarvelde 2021-04-11 11:58:04 +02:00
rodzic b8a083e5f1
commit 1f5a8ce7c7
4 zmienionych plików z 13 dodań i 15 usunięć

10
dsp.c
Wyświetl plik

@ -263,15 +263,15 @@ void dsp_init()
uint16_t slice_num;
/* Initialize DACs */
gpio_set_function(0, GPIO_FUNC_PWM); // GP0 is PWM for I DAC (Slice 0, Channel A)
gpio_set_function(1, GPIO_FUNC_PWM); // GP1 is PWM for Q DAC (Slice 0, Channel B)
dac_iq = pwm_gpio_to_slice_num(0); // Get PWM slice for GP0 (Same for GP1)
gpio_set_function(20, GPIO_FUNC_PWM); // GP20 is PWM for I DAC (Slice 2, Channel A)
gpio_set_function(21, GPIO_FUNC_PWM); // GP21 is PWM for Q DAC (Slice 2, Channel B)
dac_iq = pwm_gpio_to_slice_num(20); // Get PWM slice for GP20 (Same for GP21)
pwm_set_clkdiv_int_frac (dac_iq, 1, 0); // clock divide by 1
pwm_set_wrap(dac_iq, DAC_RANGE); // Set cycle length
pwm_set_enabled(dac_iq, true); // Set the PWM running
gpio_set_function(2, GPIO_FUNC_PWM); // GP2 is PWM for Audio DAC (Slice 1, Channel A)
dac_audio = pwm_gpio_to_slice_num(2); // Find PWM slice for GP2
gpio_set_function(22, GPIO_FUNC_PWM); // GP22 is PWM for Audio DAC (Slice 3, Channel A)
dac_audio = pwm_gpio_to_slice_num(22); // Find PWM slice for GP22
pwm_set_clkdiv_int_frac (dac_audio, 1, 0); // clock divide by 1
pwm_set_wrap(dac_audio, DAC_RANGE); // Set cycle length
pwm_set_enabled(dac_audio, true); // Set the PWM running

4
lcd.c
Wyświetl plik

@ -62,8 +62,8 @@
/* I2C address and pins */
#define I2C_LCD 0x3E
#define I2C0_SDA 8
#define I2C0_SCL 9
#define I2C0_SDA 16
#define I2C0_SCL 17
uint8_t lcd_buf[2][16]; // Buffer, y={0,1}, x={0..15}
uint8_t lcd_x, lcd_y;

Wyświetl plik

@ -170,8 +170,8 @@ Control Si5351:
/* I2C1 pins */
#define I2C1_SDA 10
#define I2C1_SCL 11
#define I2C1_SDA 18
#define I2C1_SCL 19
vfo_t vfo[2]; // 0: clk0 and clk1 1: clk2

10
uSDR.c
Wyświetl plik

@ -26,8 +26,6 @@
#include "monitor.h"
/*
* LED TIMER definition and callback routine
*/
@ -51,13 +49,13 @@ int main()
add_repeating_timer_ms(-1000, led_callback, NULL, &led_timer);
/* Initialize units */
si_init(); // VFO control unit
lcd_init(); // LCD output unit
dsp_init(); // Signal processing unit
mon_init(); // Monitor shell on stdio
lcd_init(); // LCD output unit
si_init(); // VFO control unit
dsp_init(); // Signal processing unit
SI_SETFREQ(0, 2*7074000UL); // Set freq to 2*7074 kHz
SI_SETPHASE(0,2); // Set phase to 180deg
SI_SETPHASE(0, 2); // Set phase to 180deg
si_evaluate(); // Commit setting
//lcd_test(); // Test LCD character set