remove build folder
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -100,3 +100,5 @@ dkms.conf
|
|||||||
# Built Visual Studio Code Extensions
|
# Built Visual Studio Code Extensions
|
||||||
*.vsix
|
*.vsix
|
||||||
|
|
||||||
|
#build folder
|
||||||
|
build/
|
||||||
|
@@ -1,13 +1,36 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "pico/stdlib.h"
|
#include "pico/stdlib.h"
|
||||||
|
#include "hardware/uart.h"
|
||||||
|
|
||||||
|
#include "Autoradio-Zombie-Adapter.h"
|
||||||
|
|
||||||
int main()
|
//UART0 for Degugging
|
||||||
{
|
#define UART0_ID uart0
|
||||||
stdio_init_all();
|
#define UART0_BAUD_RATE 115200
|
||||||
|
#define UART0_TX_PIN 28
|
||||||
|
#define UART0_RX_PIN 29
|
||||||
|
|
||||||
|
//UART1 for Bluetooth Module
|
||||||
|
#define UART1_ID uart1
|
||||||
|
#define UART1_BAUD_RATE 115200
|
||||||
|
#define UART1_TX_PIN 8
|
||||||
|
#define UART1_RX_PIN 9
|
||||||
|
|
||||||
|
int main(){
|
||||||
|
initGPIO();
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
printf("Hello, world!\n");
|
printf("Hello, world!\n");
|
||||||
sleep_ms(1000);
|
sleep_ms(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void initGPIO(){
|
||||||
|
// UART
|
||||||
|
// Set up our UART with the required speed.
|
||||||
|
uart_init(UART0_ID, UART0_BAUD_RATE);
|
||||||
|
// Set the TX and RX pins by using the function select on the GPIO
|
||||||
|
// Set datasheet for more information on function select
|
||||||
|
gpio_set_function(UART0_TX_PIN, GPIO_FUNC_UART);
|
||||||
|
gpio_set_function(UART0_RX_PIN, GPIO_FUNC_UART);
|
||||||
|
}
|
1
Autoradio-Zombie-Adapter.h
Normal file
1
Autoradio-Zombie-Adapter.h
Normal file
@@ -0,0 +1 @@
|
|||||||
|
void initGPIO();
|
Reference in New Issue
Block a user