
Go to the source code of this file.
Defines | |
| #define | BUSY 1 |
| #define | Clear_EXT1() ; |
| #define | Clear_EXT10() ; |
| #define | Clear_EXT2() ; |
| #define | Clear_EXT3() ; |
| #define | Clear_EXT4() ; |
| #define | Clear_EXT5() ; |
| #define | Clear_EXT6() ; |
| #define | Clear_EXT7() ; |
| #define | Clear_EXT8() ; |
| #define | Clear_EXT9() ; |
| #define | Clear_Port_Q1() ; |
| #define | Clear_Port_Q2() ; |
| #define | Clear_Port_Q3() ; |
| #define | Clear_Port_Q4() ; |
| #define | Clear_Port_Q5() ; |
| #define | Clear_Port_Q6() ; |
| #define | CONV_CURRENT 2 |
| #define | CONV_INIT 0 |
| #define | CONV_POT 1 |
| #define | Disable_over_current() ; |
| #define | Enable_over_current() ; |
| #define | FREE 0 |
| #define | Get_EXT1() ; |
| #define | Get_EXT10() ; |
| #define | Get_EXT2() ; |
| #define | Get_EXT3() ; |
| #define | Get_EXT4() ; |
| #define | Get_EXT5() ; |
| #define | Get_EXT6() ; |
| #define | Get_EXT7() ; |
| #define | Get_EXT8() ; |
| #define | Get_EXT9() ; |
| #define | HALL_A() (2); |
| #define | HALL_B() (2); |
| #define | HALL_C() (2); |
| #define | HALL_SENSOR_VALUE() (1); |
| #define | OUTPUT_ACTIVE_HIGH ; |
| #define | OUTPUT_ACTIVE_LOW ; |
| #define | output_disconnected 0x01 |
| #define | PRESC_DIV_BY_16 ; |
| #define | PRESC_DIV_BY_4 ; |
| #define | PRESC_DIV_BY_64 ; |
| #define | PRESC_NODIV ; |
| #define | PSC_CENTERED ; |
| #define | PSC_FOUR_RAMP ; |
| #define | PSC_ONE_RAMP ; |
| #define | PSC_TWO_RAMP ; |
| #define | RAMP_MODE_NUMBER PSC_CENTERED |
| #define | RELEASE_PLOCK ; |
| #define | Set_EXT1() ; |
| #define | Set_EXT10() ; |
| #define | Set_EXT2() ; |
| #define | Set_EXT3() ; |
| #define | Set_EXT4() ; |
| #define | Set_EXT5() ; |
| #define | Set_EXT6() ; |
| #define | Set_EXT7() ; |
| #define | Set_EXT8() ; |
| #define | Set_EXT9() ; |
| #define | Set_none() ; |
| #define | SET_PLOCK ; |
| #define | Set_Port_Q2() ; |
| #define | Set_Port_Q4() ; |
| #define | Set_Port_Q6() ; |
| #define | Set_Q1Q4() ; |
| #define | Set_Q1Q6() ; |
| #define | Set_Q3Q2() ; |
| #define | Set_Q3Q6() ; |
| #define | Set_Q5Q2() ; |
| #define | Set_Q5Q4() ; |
| #define | Set_timer_data_register_to_zero() (TCNT0=0x00) |
| #define | switch_OFF_LED() ; |
| #define | switch_ON_LED() ; |
| #define | Toggle_EXT2() ; |
Functions | |
| void | mc_ADC_Scheduler (void) |
| Launch the sampling procedure to get current value. | |
| void | mc_disable_during_inrush (void) |
| the purpose of this function is to disable the overcurrent detection during startup (inrush current) | |
| void | mc_duty_cycle (U8 level) |
| External interruption Sensor (A) mode toggle. | |
| void | mc_estimation_speed (void) |
| Timer0 Overflow for speed measurement. | |
| U8 | mc_Get_Current (void) |
| U8 | mc_get_hall (void) |
| Get the value of hall sensors (1 to 6). | |
| U8 | mc_Get_Potentiometer (void) |
| void | mc_init_HW (void) |
| init HW | |
| void | mc_init_timer0 (void) |
| Launch the regulation loop (see main.c) . | |
| void | mc_init_timer1 (void) |
| timer 1 Configuration Use to generate a 250us activation for sampling speed regulation | |
| void | mc_inrush_task (void) |
| the purpose of this function is to manage the delay used when the overcurrent detection is disabled | |
| void | mc_set_Over_Current (U8 Level) |
| Set the Over Current threshold. | |
| void | mc_switch_commutation (U8 position) |
| Set the Switching Commutation value on outputs according to sensor or estimation position. | |
| void | PSC0_Init (unsigned int OCRnRB, unsigned int OCRnSB, unsigned int OCRnRA, unsigned int OCRnSA) |
| Initialization of PWM generator PSC0. | |
| void | PSC1_Init (unsigned int OCRnRB, unsigned int OCRnSB, unsigned int OCRnRA, unsigned int OCRnSA) |
| Initialization of PWM generator PSC1. | |
| void | PSC2_Init (unsigned int OCRnRB, unsigned int OCRnSB, unsigned int OCRnRA, unsigned int OCRnSA) |
| Initialization of PWM generator PSC2. | |
| #define Clear_EXT3 | ( | ) | ; |
| #define HALL_SENSOR_VALUE | ( | ) | (1); |
| #define Set_EXT3 | ( | ) | ; |
| void mc_ADC_Scheduler | ( | void | ) |
Launch the sampling procedure to get current value.
Definition at line 296 of file mc_drv.c.
| void mc_disable_during_inrush | ( | void | ) |
the purpose of this function is to disable
the overcurrent detection during startup (inrush current)
Definition at line 315 of file mc_drv.c.
Referenced by mci_retry_run(), and mci_run().
| void mc_duty_cycle | ( | U8 | level | ) |
External interruption Sensor (A) mode toggle.
Definition at line 180 of file mc_drv.c.
Referenced by mci_retry_run(), and mci_run().
| void mc_estimation_speed | ( | void | ) |
Timer0 Overflow for speed measurement.
Definition at line 265 of file mc_drv.c.
| U8 mc_Get_Current | ( | void | ) |
| U8 mc_get_hall | ( | void | ) |
Get the value of hall sensors (1 to 6).
| return | an unsigned char value of hall sensor |
Definition at line 119 of file mc_drv.c.
References HALL_SENSOR_VALUE.
Referenced by mci_retry_run(), and mci_run().
00120 { 00121 return HALL_SENSOR_VALUE(); 00122 }
| U8 mc_Get_Potentiometer | ( | void | ) |
| void mc_init_HW | ( | void | ) |
| void mc_init_timer0 | ( | void | ) |
Launch the regulation loop (see main.c) .
Definition at line 239 of file mc_drv.c.
| void mc_init_timer1 | ( | void | ) |
| void mc_inrush_task | ( | void | ) |
| void mc_set_Over_Current | ( | U8 | Level | ) |
| void mc_switch_commutation | ( | U8 | position | ) |
Set the Switching Commutation value on outputs according to sensor or estimation position.
| position | (1 to 6) and direction (FORWARD or BACKWARD) |
Definition at line 190 of file mc_drv.c.
Referenced by mci_retry_run(), and mci_run().
| void PSC0_Init | ( | unsigned int | OCRnRB, | |
| unsigned int | OCRnSB, | |||
| unsigned int | OCRnRA, | |||
| unsigned int | OCRnSA | |||
| ) |
| void PSC1_Init | ( | unsigned int | OCRnRB, | |
| unsigned int | OCRnSB, | |||
| unsigned int | OCRnRA, | |||
| unsigned int | OCRnSA | |||
| ) |
| void PSC2_Init | ( | unsigned int | OCRnRB, | |
| unsigned int | OCRnSB, | |||
| unsigned int | OCRnRA, | |||
| unsigned int | OCRnSA | |||
| ) |
1.5.7.1