Skip to content

Commit

Permalink
system building & basic adc to dac passthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
trentgill committed Jun 29, 2024
1 parent 03d9a80 commit 54e94e6
Show file tree
Hide file tree
Showing 37 changed files with 895 additions and 4,080 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ SRC = main.c \
system_stm32f7xx.c \
$(HALS)/stm32f7xx_hal.c \
$(HALS)/stm32f7xx_hal_cortex.c \
$(HALS)/stm32f7xx_hal_adc.c \
$(HALS)/stm32f7xx_hal_rcc.c \
$(HALS)/stm32f7xx_hal_rcc_ex.c \
$(HALS)/stm32f7xx_hal_flash.c \
Expand All @@ -87,6 +88,7 @@ SRC = main.c \
$(HALS)/stm32f7xx_hal_pwr_ex.c \
$(HALS)/stm32f7xx_hal_rng.c \
$(HALS)/stm32f7xx_hal_spi.c \
$(HALS)/stm32f7xx_hal_sai.c \
$(HALS)/stm32f7xx_hal_tim.c \
$(HALS)/stm32f7xx_hal_tim_ex.c \
$(HALS)/stm32f7xx_hal_uart.c \
Expand Down
4 changes: 2 additions & 2 deletions lib/casl.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "caw.h" // Caw_printf

#include "lualink.h" // L_queue_asl_done for raising a sequence-complete event
// #include "lualink.h" // L_queue_asl_done for raising a sequence-complete event

// TODO
// add sequins data type
Expand Down Expand Up @@ -396,7 +396,7 @@ static void next_action( int index )
} else {
stepup:
if( !seq_up(self) ){ // To invalid. Jump up. return if nothing left to do
L_queue_asl_done(index); // trigger a lua event when sequence is complete
// L_queue_asl_done(index); // trigger a lua event when sequence is complete
return;
}
}
Expand Down
10 changes: 5 additions & 5 deletions lib/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <stdlib.h>
#include <math.h>

#include "lualink.h"
// #include "lualink.h"
#include <stm32f7xx_hal.h> // HAL_GetTick
#include "clock_ll.h" // linked list for clocks

Expand Down Expand Up @@ -80,14 +80,14 @@ void clock_update(uint32_t time_now)
sleep_next:
if(sleep_head // list is not empty
&& sleep_head->wakeup < dtime_now){ // time to awaken
L_queue_clock_resume(sleep_head->coro_id); // event!
// L_queue_clock_resume(sleep_head->coro_id); // event!
ll_insert_idle(ll_pop(&sleep_head)); // return to idle list
goto sleep_next; // check the next sleeper too!
}
sync_next:
if(sync_head // list is not empty
&& sync_head->wakeup < precise_beat_now){ // time to awaken
L_queue_clock_resume(sync_head->coro_id); // event!
// L_queue_clock_resume(sync_head->coro_id); // event!
ll_insert_idle(ll_pop(&sync_head)); // return to idle list
goto sync_next; // check the next syncer too!
}
Expand Down Expand Up @@ -139,14 +139,14 @@ void clock_update_reference_from(double beats, double beat_duration, clock_sourc
void clock_start_from( clock_source_t source )
{
if( clock_source == source ){
L_queue_clock_start();
// L_queue_clock_start();
}
}

void clock_stop_from( clock_source_t source )
{
if( clock_source == source ){
L_queue_clock_stop();
// L_queue_clock_stop();
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <stdio.h>
#include <stm32f7xx.h>
#include "events.h"
#include "lualink.h"
// #include "lualink.h"
#include "caw.h" // Caw_send_luachunk


Expand Down
3 changes: 3 additions & 0 deletions lib/ftrack.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "ftrack.h"

/*
#include "ll/adda.h" // ADDA_BLOCK_SIZE
// time constant
Expand Down Expand Up @@ -95,3 +96,5 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
zc++;
}
}
*/
Loading

0 comments on commit 54e94e6

Please sign in to comment.