X-Git-Url: https://rtime.felk.cvut.cz/gitweb/fpga/rpi-motor-control.git/blobdiff_plain/8f3fb13ef9c8da9ac312b3b3b0ea4239306b986f..1cf729421e63f859e426a429f9ce935a86afd167:/pmsm-control/test_sw/main_pmsm.c diff --git a/pmsm-control/test_sw/main_pmsm.c b/pmsm-control/test_sw/main_pmsm.c index 25b0acc..2eb9262 100644 --- a/pmsm-control/test_sw/main_pmsm.c +++ b/pmsm-control/test_sw/main_pmsm.c @@ -63,6 +63,7 @@ struct rpi_state rps={ .alpha_offset=960 }; + /** * \brief Initilizes GPCLK. */ @@ -73,13 +74,6 @@ int clk_init() gpioSetMode(4, FSEL_ALT0); return 0; } -/* - * \brief Terminates GPCLK. - */ - -inline void clk_disable(){ - termClock(0); -} /** * \brief Signal handler pro Ctrl+C @@ -95,7 +89,7 @@ void appl_stop(){ spi_read(&rps); spi_disable(); - clk_disable(); + termClock(0); freeLogs(&rps); /*muzeme zavrit semafor*/ sem_destroy(&rps.thd_par_sem); @@ -194,11 +188,9 @@ void * read_data(void* param){ } } - /** * \brief Main function. */ - int main(){ pthread_t base_thread_id; clk_init(); /* inicializace gpio hodin */