Skip to content

Commit

Permalink
(#5) Added timer handle assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
benthacher committed Mar 25, 2024
1 parent 80e57c5 commit 1822561
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CM7/Core/Src/encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ encoder_t *encoder_init(SPI_HandleTypeDef *spi_handle, TIM_HandleTypeDef *timer_
{
// make sure the handle exists
assert(spi_handle);
assert(timer_handle);

// allocate new struct
encoder_t *encoder = malloc(sizeof(encoder_t));
Expand Down

0 comments on commit 1822561

Please sign in to comment.