diff --git a/doc/eluadoc/arch_platform_pwm.lua b/doc/eluadoc/arch_platform_pwm.lua
index ab25962..93741ce 100644
--- a/doc/eluadoc/arch_platform_pwm.lua
+++ b/doc/eluadoc/arch_platform_pwm.lua
@@ -49,28 +49,44 @@ enum
       ret = "The actual frequency set on the PWM channel, which might differ from the $frequency$ parameter, depeding on the hardware",
     },
 
-    { sig = "u32 #platform_pwm_op#( unsigned id, int op, u32 data );",
-      desc = "Executes an operation on a PWM channel",
+    { sig = "u32 #platform_pwm_start#( unsigned id );",
+      desc = "Starts PWM generation on the specified channel",
       args = 
       {
         "$id$ - PWM channel ID",
-        [[$op$ - the operation that must be executed. It can take any value from @#pwm_operations@this enum@, as follows:
-  <ul>
-    <li>$PLATFORM_PWM_OP_START$: starts PWM generation on the specified channel.</li>
-    <li>$PLATFORM_PWM_OP_STOP$: stops PWM generation on the specified channel.</li>  
-    <li>$PLATFORM_PWM_OP_SET_CLOCK$: sets the $base$ clock of the specified PWM channel (which will be used to generate the frequencies requested by 
-        @#platform_pwm_setup@platform_pwm_setup@) to $data$ hertz.</li>
-    <li>$PLATFORM_PWM_OP_GET_CLOCK$: get the $base$ clock of the specified PWM channel.</li>
-  </ul>]],
-        "$data$ - when used with $op$ == $PLATFORM_PWM_OP_SET_CLOCK$ it is used to specify the value of the base clock. Not used with other operations."
+      }
+    },
+
+    { sig = "u32 #platform_pwm_stop#( unsigned id );",
+      desc = "Stops PWM generation on the specified channel",
+      args = 
+      {
+        "$id$ - PWM channel ID",
+      }
+    },
+
+    { sig = "u32 #platform_pwm_set_clock#( unsigned id, u32 clock );",
+      desc = "Sets the $base$ clock of the specified PWM channel
+        (which will be used to generate the frequencies requested by 
+        @#platform_pwm_setup@platform_pwm_setup@) to $data$ hertz.",
+      args = 
+      {
+        "$id$ - PWM channel ID",
+        "$clock$ - the desired frequency of the base clock.
       },
-      ret = 
+      ret = "The actual value of the base clock, which might be different
+        from $data$ depending on the hardware",
+    },
+
+    { sig = "u32 #platform_pwm_get_clock#( unsigned id );",
+      desc = "Gets the $base$ clock of the specified PWM channel"
+      args = 
       {
-        "the actual value of the base clock when $op$ == $PLATFORM_PWM_OP_SET_CLOCK$, which might be different than $data$ depending on the hardware",
-        "the value of the base clock when $op$ == $PLATFORM_PWM_OP_GET_CLOCK$",
-        "irrelevant for other operations"
-      }  
-    }
+        "$id$ - PWM channel ID",
+        "$clock$ - the desired frequency of the base clock.
+      },
+      ret = "the value of the base clock"
+    },
   }
 }
 
diff --git a/inc/platform.h b/inc/platform.h
index 2cf1191..34f7a4e 100644
--- a/inc/platform.h
+++ b/inc/platform.h
@@ -198,19 +198,13 @@ u32 platform_timer_get_diff_us( unsigned id, timer_data_type end, timer_data_typ
 // There are 16 "virtual" PWM channels (PWM0...PWM15)
 #define PLATFORM_PWM_TOTAL                    16
 
-// PWM operations
-enum
-{
-  PLATFORM_PWM_OP_START,
-  PLATFORM_PWM_OP_STOP,
-  PLATFORM_PWM_OP_SET_CLOCK,
-  PLATFORM_PWM_OP_GET_CLOCK
-};
-
 // The platform PWM functions
 int platform_pwm_exists( unsigned id );
 u32 platform_pwm_setup( unsigned id, u32 frequency, unsigned duty );
-u32 platform_pwm_op( unsigned id, int op, u32 data );
+void platform_pwm_start( unsigned id );
+void platform_pwm_stop( unsigned id );
+u32 platform_pwm_set_clock( unsigned id, u32 data );
+u32 platform_pwm_get_clock( unsigned id );
 
 // *****************************************************************************
 // CPU specific functions
diff --git a/src/modules/pwm.c b/src/modules/pwm.c
index 27287dc..d38eace 100644
--- a/src/modules/pwm.c
+++ b/src/modules/pwm.c
@@ -31,7 +31,7 @@ static int pwm_start( lua_State* L )
   
   id = luaL_checkinteger( L, 1 );
   MOD_CHECK_ID( pwm, id );
-  platform_pwm_op( id, PLATFORM_PWM_OP_START, 0 );
+  platform_pwm_start( id );
   return 0;  
 }
 
@@ -42,7 +42,7 @@ static int pwm_stop( lua_State* L )
   
   id = luaL_checkinteger( L, 1 );
   MOD_CHECK_ID( pwm, id );
-  platform_pwm_op( id, PLATFORM_PWM_OP_STOP, 0 );
+  platform_pwm_stop( id );
   return 0;  
 }
 
@@ -55,7 +55,7 @@ static int pwm_setclock( lua_State* L )
   id = luaL_checkinteger( L, 1 );
   MOD_CHECK_ID( pwm, id );
   clk = luaL_checkinteger( L, 2 );
-  clk = platform_pwm_op( id, PLATFORM_PWM_OP_SET_CLOCK, clk );
+  clk = platform_pwm_set_clock( id, clk );
   lua_pushinteger( L, clk );
   return 1;
 }
@@ -68,7 +68,7 @@ static int pwm_getclock( lua_State* L )
   
   id = luaL_checkinteger( L, 1 );
   MOD_CHECK_ID( pwm, id );
-  clk = platform_pwm_op( id, PLATFORM_PWM_OP_GET_CLOCK, 0 );
+  clk = platform_pwm_get_clock( id );
   lua_pushinteger( L, clk );
   return 1;
 }
diff --git a/src/platform/at91sam7x/platform.c b/src/platform/at91sam7x/platform.c
index 2f25e89..90a72b2 100644
--- a/src/platform/at91sam7x/platform.c
+++ b/src/platform/at91sam7x/platform.c
@@ -338,8 +338,8 @@ u32 platform_s_timer_op( unsigned id, int op, u32 data )
 // PWM pins
 static const Pin pwm_pins[] = { PIN_PWMC_PWM0, PIN_PWMC_PWM1, PIN_PWMC_PWM2, PIN_PWMC_PWM3 };
 
-// Helper function: return the PWM clock
-static u32 platform_pwm_get_clock( unsigned id )
+// Return the PWM clock
+u32 platform_pwm_get_clock( unsigned id )
 {
   u32 cfg = AT91C_BASE_PWMC->PWMC_CH[ id ].PWMC_CMR;
   u16 clkdata;
@@ -358,8 +358,8 @@ static u32 platform_pwm_get_clock( unsigned id )
   }
 }
 
-// Helper function: set the PWM clock
-static u32 platform_pwm_set_clock( unsigned id, u32 clock )
+// Set the PWM clock
+u32 platform_pwm_set_clock( unsigned id, u32 clock )
 {
   if( id < 2 )
     PWMC_ConfigureClocks( clock, 0, BOARD_MCK );
@@ -386,30 +386,14 @@ u32 platform_pwm_setup( unsigned id, u32 frequency, unsigned duty )
   return pwmclk / period;
 }
 
-u32 platform_pwm_op( unsigned id, int op, u32 data )
+void platform_pwm_start( unsigned id )
 {
-  u32 res = 0;
-    
-  switch( op )
-  {
-    case PLATFORM_PWM_OP_SET_CLOCK:
-      res = platform_pwm_set_clock( id, data );
-      break;
-      
-    case PLATFORM_PWM_OP_GET_CLOCK:
-      res = platform_pwm_get_clock( id );
-      break;
-      
-    case PLATFORM_PWM_OP_START:
-      PIO_Configure( pwm_pins + id, 1 );    
-      res = AT91C_BASE_PWMC->PWMC_ISR;
-      break;
-      
-    case PLATFORM_PWM_OP_STOP:
-      platform_pio_op( 1, 1 << ( 19 + id ), PLATFORM_IO_PIN_DIR_INPUT );
-      break;
-  }
-  
-  return res;
+  volatile u32 dummy;
+  PIO_Configure( pwm_pins + id, 1 );    
+  dummy = AT91C_BASE_PWMC->PWMC_ISR;
 }
 
+void platform_pwm_stop( unsigned id )
+{
+  platform_pio_op( 1, 1 << ( 19 + id ), PLATFORM_IO_PIN_DIR_INPUT );
+}
diff --git a/src/platform/avr32/platform.c b/src/platform/avr32/platform.c
index 1298539..e7c99e5 100644
--- a/src/platform/avr32/platform.c
+++ b/src/platform/avr32/platform.c
@@ -946,7 +946,7 @@ static void find_clock_configuration( u32 frequency,
 #undef prescalers
 
 
-static u32 pwm_set_clock_freq( u32 freq )
+u32 platform_pwm_set_clock( unsigned id, u32 freq )
 {
   unsigned pre, div;
 
@@ -956,29 +956,19 @@ static u32 pwm_set_clock_freq( u32 freq )
   return pwm_get_clock_freq();
 }
 
-u32 platform_pwm_op( unsigned id, int op, u32 data)
+u32 platform_pwm_get_clock( unsigned id )
 {
-  // Sanity check
-  if (id < 0 || id >= NUM_PWM)
-    return 0;
-
-  switch( op )
-  {
-    case PLATFORM_PWM_OP_SET_CLOCK:
-      return pwm_set_clock_freq( data );
-
-    case PLATFORM_PWM_OP_GET_CLOCK:
-      return pwm_get_clock_freq();
+  return pwm_get_clock_freq();
+}
 
-    case PLATFORM_PWM_OP_START:
-      pwm_channel_start( id );
-      break;
+void platform_pwm_start( unsigned id )
+{
+  pwm_channel_start( id );
+}
 
-    case PLATFORM_PWM_OP_STOP:
-      pwm_channel_stop( id );
-      break;
-  }
-  return 0;
+void platform_pwm_stop( unsigned id )
+{
+  pwm_channel_stop( id );
 }
 
 #endif // #if NUM_PWM > 0
diff --git a/src/platform/lm3s/platform.c b/src/platform/lm3s/platform.c
index daa74e1..f91744c 100644
--- a/src/platform/lm3s/platform.c
+++ b/src/platform/lm3s/platform.c
@@ -595,8 +595,8 @@ static void pwms_init()
   MAP_SysCtlPWMClockSet( SYSCTL_PWMDIV_1 );
 }
 
-// Helper function: return the PWM clock
-static u32 platform_pwm_get_clock()
+// Return the PWM clock
+u32 platform_pwm_get_clock( unsigned id )
 {
   unsigned i;
   u32 clk;
@@ -608,8 +608,8 @@ static u32 platform_pwm_get_clock()
   return MAP_SysCtlClockGet() / pwm_div_data[ i ];
 }
 
-// Helper function: set the PWM clock
-static u32 platform_pwm_set_clock( u32 clock )
+// Set the PWM clock
+u32 platform_pwm_set_clock( unsigned id, u32 clock )
 {
   unsigned i, min_i;
   u32 sysclk;
@@ -624,7 +624,7 @@ static u32 platform_pwm_set_clock( u32 clock )
 
 u32 platform_pwm_setup( unsigned id, u32 frequency, unsigned duty )
 {
-  u32 pwmclk = platform_pwm_get_clock();
+  u32 pwmclk = platform_pwm_get_clock( id );
   u32 period;
 
   // Set pin as PWM
@@ -640,32 +640,16 @@ u32 platform_pwm_setup( unsigned id, u32 frequency, unsigned duty )
   return pwmclk / period;
 }
 
-u32 platform_pwm_op( unsigned id, int op, u32 data )
+void platform_pwm_start( unsigned id )
 {
-  u32 res = 0;
-
-  switch( op )
-  {
-    case PLATFORM_PWM_OP_SET_CLOCK:
-      res = platform_pwm_set_clock( data );
-      break;
-
-    case PLATFORM_PWM_OP_GET_CLOCK:
-      res = platform_pwm_get_clock();
-      break;
-
-    case PLATFORM_PWM_OP_START:
-      MAP_PWMOutputState( PWM_BASE, 1 << id, true );
-      MAP_PWMGenEnable( PWM_BASE, pwm_gens[ id >> 1 ] );
-      break;
-
-    case PLATFORM_PWM_OP_STOP:
-      MAP_PWMOutputState( PWM_BASE, 1 << id, false );
-      MAP_PWMGenDisable( PWM_BASE, pwm_gens[ id >> 1 ] );
-      break;
-  }
+  MAP_PWMOutputState( PWM_BASE, 1 << id, true );
+  MAP_PWMGenEnable( PWM_BASE, pwm_gens[ id >> 1 ] );
+}
 
-  return res;
+void platform_pwm_stop( unsigned id )
+{
+  MAP_PWMOutputState( PWM_BASE, 1 << id, false );
+  MAP_PWMGenDisable( PWM_BASE, pwm_gens[ id >> 1 ] );
 }
 
 // *****************************************************************************
diff --git a/src/platform/lpc17xx/platform.c b/src/platform/lpc17xx/platform.c
index dafe767..3e672ce 100644
--- a/src/platform/lpc17xx/platform.c
+++ b/src/platform/lpc17xx/platform.c
@@ -538,13 +538,13 @@ int platform_adc_start_sequence()
 
 
 // Helper function: get timer clock
-static u32 platform_pwm_get_clock( unsigned id )
+u32 platform_pwm_get_clock( unsigned id )
 {
   return CLKPWR_GetPCLK( CLKPWR_PCLKSEL_PWM1 ) / ( LPC_PWM1->PR + 1 );
 }
 
 // Helper function: set timer clock
-static u32 platform_pwm_set_clock( unsigned id, u32 clock )
+u32 platform_pwm_set_clock( unsigned id, u32 clock )
 {
   PWM_TIMERCFG_Type PWMCfgDat;
   
@@ -599,30 +599,14 @@ u32 platform_pwm_setup( unsigned id, u32 frequency, unsigned duty )
   return platform_pwm_get_clock( id ) / divisor;
 }
 
-u32 platform_pwm_op( unsigned id, int op, u32 data )
+void platform_pwm_start( unsigned id )
 {
-  u32 res = 0;
-
-  switch( op )
-  {
-    case PLATFORM_PWM_OP_START:
-      PWM_Cmd(LPC_PWM1, ENABLE);
-      break;
-
-    case PLATFORM_PWM_OP_STOP:
-      PWM_Cmd(LPC_PWM1, DISABLE);
-      break;
-
-    case PLATFORM_PWM_OP_SET_CLOCK:
-      res = platform_pwm_set_clock( id, data );
-      break;
-
-    case PLATFORM_PWM_OP_GET_CLOCK:
-      res = platform_pwm_get_clock( id );
-      break;
-  }
+  PWM_Cmd(LPC_PWM1, ENABLE);
+}
 
-  return res;
+void platform_pwm_stop( unsigned id )
+{
+  PWM_Cmd(LPC_PWM1, DISABLE);
 }
 
 // ****************************************************************************
diff --git a/src/platform/lpc24xx/platform.c b/src/platform/lpc24xx/platform.c
index 2e145fe..e0368b6 100644
--- a/src/platform/lpc24xx/platform.c
+++ b/src/platform/lpc24xx/platform.c
@@ -799,8 +799,8 @@ enum
   PWM_ENABLE_6 = 1 << 14,
 };
 
-// Helper function: get timer clock
-static u32 platform_pwm_get_clock( unsigned id )
+// Get timer clock
+u32 platform_pwm_get_clock( unsigned id )
 {
   unsigned pwmid = id / 6;
   PREG PWMxPR = ( PREG )pwm_pr[ pwmid ];
@@ -808,8 +808,8 @@ static u32 platform_pwm_get_clock( unsigned id )
   return Fpclk / ( *PWMxPR + 1 );
 }
 
-// Helper function: set timer clock
-static u32 platform_pwm_set_clock( unsigned id, u32 clock )
+// Set timer clock
+u32 platform_pwm_set_clock( unsigned id, u32 clock )
 {
   u32 div = Fpclk / clock, prevtc;
   unsigned pwmid = id / 6;
@@ -860,34 +860,22 @@ u32 platform_pwm_setup( unsigned id, u32 frequency, unsigned duty )
   return platform_pwm_get_clock( id ) / divisor;
 }
 
-u32 platform_pwm_op( unsigned id, int op, u32 data )
+void platform_pwm_start( unsigned id )
 {
-  u32 res = 0;
   unsigned pwmid = id / 6;
   PREG PWMxTCR = ( PREG )pwm_tcr[ pwmid ];
   PREG PWMxPCR = ( PREG )pwm_pcr[ pwmid ];
 
-  switch( op )
-  {
-    case PLATFORM_PWM_OP_START:
-      *PWMxPCR = PWM_ENABLE_1 | PWM_ENABLE_2 | PWM_ENABLE_3 | PWM_ENABLE_4 | PWM_ENABLE_5 | PWM_ENABLE_6;
-      *PWMxTCR = PWM_ENABLE | PWM_MODE;
-      break;
-
-    case PLATFORM_PWM_OP_STOP:
-      *PWMxPCR = 0;   
-      *PWMxTCR = PWM_RESET;
-      break;
-
-    case PLATFORM_PWM_OP_SET_CLOCK:
-      res = platform_pwm_set_clock( id, data );
-      break;
+  *PWMxPCR = PWM_ENABLE_1 | PWM_ENABLE_2 | PWM_ENABLE_3 | PWM_ENABLE_4 | PWM_ENABLE_5 | PWM_ENABLE_6;
+  *PWMxTCR = PWM_ENABLE | PWM_MODE;
+}
 
-    case PLATFORM_PWM_OP_GET_CLOCK:
-      res = platform_pwm_get_clock( id );
-      break;
-  }
+void platform_pwm_stop( unsigned id )
+{
+  unsigned pwmid = id / 6;
+  PREG PWMxTCR = ( PREG )pwm_tcr[ pwmid ];
+  PREG PWMxPCR = ( PREG )pwm_pcr[ pwmid ];
 
-  return res;
+  *PWMxPCR = 0;   
+  *PWMxTCR = PWM_RESET;
 }
-
diff --git a/src/platform/stm32/platform.c b/src/platform/stm32/platform.c
index c57269a..5101b52 100755
--- a/src/platform/stm32/platform.c
+++ b/src/platform/stm32/platform.c
@@ -844,16 +844,17 @@ static void pwms_init()
   // 
 }
 
-// Helper function: return the PWM clock
-// NOTE: Can't find a function to query for the period set for the timer, therefore using the struct.
-//       This may require adjustment if driver libraries are updated.
-static u32 platform_pwm_get_clock()
+// Return the PWM clock
+// NOTE: Can't find a function to query for the period set for the timer,
+// therefore using the struct.
+// This may require adjustment if driver libraries are updated.
+u32 platform_pwm_get_clock( unsigned id )
 {
   return ( ( TIM_GET_BASE_CLK( PWM_TIMER_ID ) / ( TIM_GetPrescaler( PWM_TIMER_NAME ) + 1 ) ) / ( PWM_TIMER_NAME->ARR + 1 ) );
 }
 
-// Helper function: set the PWM clock
-static u32 platform_pwm_set_clock( u32 clock )
+// Set the PWM clock
+u32 platform_pwm_set_clock( unsigned id, u32 clock )
 {
   TIM_TimeBaseInitTypeDef  TIM_TimeBaseStructure;
   TIM_TypeDef* ptimer = PWM_TIMER_NAME;
@@ -872,7 +873,7 @@ static u32 platform_pwm_set_clock( u32 clock )
   TIM_TimeBaseStructure.TIM_RepetitionCounter = 0x0000;
   TIM_TimeBaseInit( ptimer, &TIM_TimeBaseStructure );
     
-  return platform_pwm_get_clock();
+  return platform_pwm_get_clock( id );
 }
 
 u32 platform_pwm_setup( unsigned id, u32 frequency, unsigned duty )
@@ -891,7 +892,7 @@ u32 platform_pwm_setup( unsigned id, u32 frequency, unsigned duty )
   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
   GPIO_Init(GPIOC, &GPIO_InitStructure);
   
-  clock = platform_pwm_set_clock( frequency );
+  clock = platform_pwm_set_clock( id, frequency );
   TIM_ARRPreloadConfig( ptimer, ENABLE );
   
   /* PWM Mode configuration */  
@@ -931,30 +932,14 @@ u32 platform_pwm_setup( unsigned id, u32 frequency, unsigned duty )
   return clock;
 }
 
-u32 platform_pwm_op( unsigned id, int op, u32 data )
+void platform_pwm_start( unsigned id )
 {
-  u32 res = 0;
-
-  switch( op )
-  {
-    case PLATFORM_PWM_OP_SET_CLOCK:
-      res = platform_pwm_set_clock( data );
-      break;
-
-    case PLATFORM_PWM_OP_GET_CLOCK:
-      res = platform_pwm_get_clock();
-      break;
-
-    case PLATFORM_PWM_OP_START:
-      PWM_TIMER_NAME->CCER |= ( ( u16 )1 << 4 * id );
-      break;
-
-    case PLATFORM_PWM_OP_STOP:
-      PWM_TIMER_NAME->CCER &= ~( ( u16 )1 << 4 * id );
-      break;
-  }
+  PWM_TIMER_NAME->CCER |= ( ( u16 )1 << 4 * id );
+}
 
-  return res;
+void platform_pwm_stop( unsigned id )
+{
+  PWM_TIMER_NAME->CCER &= ~( ( u16 )1 << 4 * id );
 }
 
 // *****************************************************************************
diff --git a/src/platform/str7/platform.c b/src/platform/str7/platform.c
index 0bebcb6..7e285c8 100644
--- a/src/platform/str7/platform.c
+++ b/src/platform/str7/platform.c
@@ -319,31 +319,26 @@ u32 platform_pwm_setup( unsigned id, u32 frequency, unsigned duty )
   return pwmclk / period;
 }
 
-u32 platform_pwm_op( unsigned id, int op, u32 data )
+u32 platform_pwm_set_clock( unsigned id, u32 clock )
+{
+  return platform_timer_set_clock( id + 1, clock );
+}
+
+u32 platform_pwm_get_clock( unsigned id )
+{
+  return platform_timer_get_clock( id + 1 );
+}
+
+void platform_pwm_start( unsigned id )
 {
-  u32 res = 0;
   TIM_TypeDef *ptimer = ( TIM_TypeDef* )tim_periph[ id + 1 ];
-  
-  switch( op )
-  {
-    case PLATFORM_PWM_OP_SET_CLOCK:
-      res = platform_timer_set_clock( id + 1, data );
-      break;
-      
-    case PLATFORM_PWM_OP_GET_CLOCK:
-      res = platform_timer_get_clock( id + 1 );
-      break;
-      
-    case PLATFORM_PWM_OP_START:
-      TIM_CounterConfig( ptimer, TIM_START );
-      break;
-      
-    case PLATFORM_PWM_OP_STOP:
-      TIM_CounterConfig( ptimer, TIM_STOP );
-      platform_pio_op( pwm_ports[ id ], pwm_pins[ id ], PLATFORM_IO_PIN_DIR_INPUT );
-      break;
-  }
-  
-  return res;
+
+  TIM_CounterConfig( ptimer, TIM_START );
 }
 
+void platform_pwm_stop( unsigned id )
+{
+  TIM_TypeDef *ptimer = ( TIM_TypeDef* )tim_periph[ id + 1 ];
+
+  platform_pio_op( pwm_ports[ id ], pwm_pins[ id ], PLATFORM_IO_PIN_DIR_INPUT );
+}
diff --git a/src/platform/str9/platform.c b/src/platform/str9/platform.c
index 3c02c0d..4417818 100644
--- a/src/platform/str9/platform.c
+++ b/src/platform/str9/platform.c
@@ -658,7 +658,7 @@ u32 platform_pwm_setup( unsigned id, u32 frequency, unsigned duty )
   return base / div;
 }
 
-static u32 platform_pwm_set_clock( unsigned id, u32 clock )
+u32 platform_pwm_set_clock( unsigned id, u32 clock )
 {
   TIM_TypeDef* p_timer = ( TIM_TypeDef* )str9_timer_data[ id ];
   u32 base = ( SCU_GetPCLKFreqValue() * 1000 );
@@ -668,31 +668,25 @@ static u32 platform_pwm_set_clock( unsigned id, u32 clock )
   return base / div;
 }
 
-u32 platform_pwm_op( unsigned id, int op, u32 data )
+u32 platform_pwm_get_clock( unsigned id )
 {
-  u32 res = 0;
   TIM_TypeDef* p_timer = ( TIM_TypeDef* )str9_timer_data[ id ];
 
-  switch( op )
-  {
-    case PLATFORM_PWM_OP_START:
-      TIM_CounterCmd( p_timer, TIM_START );
-      break;
+  return ( SCU_GetPCLKFreqValue() * 1000 ) / ( TIM_GetPrescalerValue( p_timer ) + 1 );
+}
 
-    case PLATFORM_PWM_OP_STOP:
-      TIM_CounterCmd( p_timer, TIM_STOP );
-      break;
+void platform_pwm_start( unsigned id )
+{
+  TIM_TypeDef* p_timer = ( TIM_TypeDef* )str9_timer_data[ id ];
 
-    case PLATFORM_PWM_OP_SET_CLOCK:
-      res = platform_pwm_set_clock( id, data );
-      break;
+  TIM_CounterCmd( p_timer, TIM_START );
+}
 
-    case PLATFORM_PWM_OP_GET_CLOCK:
-      res = ( SCU_GetPCLKFreqValue() * 1000 ) / ( TIM_GetPrescalerValue( p_timer ) + 1 );
-      break;
-  }
+void platform_pwm_stop( unsigned id )
+{
+  TIM_TypeDef* p_timer = ( TIM_TypeDef* )str9_timer_data[ id ];
 
-  return res;
+  TIM_CounterCmd( p_timer, TIM_STOP );
 }
 
 // ****************************************************************************
