Merge branch 'master' of https://git.pupes.org/PoliEcho/sint-gauntlet
This commit is contained in:
commit
2b4818b8c1
@ -1,9 +1,51 @@
|
|||||||
|
#include "macro.h"
|
||||||
#include "pico/stdlib.h"
|
#include "pico/stdlib.h"
|
||||||
|
#include ""
|
||||||
|
#include <hardware/gpio.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include "const.h"
|
||||||
|
#include "hardware/pwm.h"
|
||||||
|
#include "hardware/adc.h"
|
||||||
|
#include "state.h"
|
||||||
|
|
||||||
int main() {
|
state_t state;
|
||||||
|
|
||||||
|
void init_all() {
|
||||||
stdio_init_all();
|
stdio_init_all();
|
||||||
puts("Sint!!!!!!!!!!!111+1!!!!");
|
puts("Starting PIN initialization");
|
||||||
return 0;
|
const uint8_t out_gpio[] = {MUX_S0,MUX_S1,MUX_S2, STATUS_LED};
|
||||||
|
const uint8_t in_gpio[] = {VCO_BUTTON,QUANT_BUTTON,AMEN_BUTTON};
|
||||||
|
const uint8_t adc_gpio[] = {MUX0,MUX1};
|
||||||
|
|
||||||
|
gpio_set_function(AUDIO_OUTPUT, GPIO_FUNC_PWM);
|
||||||
|
|
||||||
|
for (uint8_t i=0; i < ARRAY_LENGTH(out_gpio); i++) {
|
||||||
|
gpio_init(out_gpio[i]);
|
||||||
|
gpio_set_dir(out_gpio[i], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint8_t i=0; i < ARRAY_LENGTH(in_gpio); i++) {
|
||||||
|
gpio_init(in_gpio[i]);
|
||||||
|
gpio_set_dir(in_gpio[i], false);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint8_t i=0; i < ARRAY_LENGTH(adc_gpio); i++) {
|
||||||
|
adc_gpio_init(adc_gpio[i]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
__attribute__((noreturn)) int main() {
|
||||||
|
init_all();
|
||||||
|
|
||||||
|
|
||||||
|
gpio_init(MUX_S0);
|
||||||
|
gpio_init(MUX_S1);
|
||||||
|
gpio_init(MUX_S1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user