Remeoved unnecessary code.
authorMartin Prudek <prudemar@fel.cvut.cz>
Wed, 20 May 2015 17:33:03 +0000 (19:33 +0200)
committerMartin Prudek <prudemar@fel.cvut.cz>
Wed, 20 May 2015 17:33:03 +0000 (19:33 +0200)
pmsm-control/test_sw/main_pmsm.c

index 25b0acc..2eb9262 100644 (file)
@@ -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 */