CQ_KIT_Ver1_5
Dependencies: mbed RateLimiter BLDCmotorDriverCQ_KIT_Ver1_5
X_NUCLEO_IHM07M1/SPN7Driver.h@7:022c306baeb9, 2016-10-17 (annotated)
- Committer:
- avilei
- Date:
- Mon Oct 17 15:27:00 2016 +0000
- Revision:
- 7:022c306baeb9
- Parent:
- 4:3f63eed73ad1
Add credits to the TVZ Mechatronics Team
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
avilei | 2:4ae769d0b112 | 1 | /* mbed Microcontroller Library |
avilei | 2:4ae769d0b112 | 2 | * Copyright (c) 2006-2016 ARM Limited |
avilei | 2:4ae769d0b112 | 3 | * |
avilei | 2:4ae769d0b112 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
avilei | 2:4ae769d0b112 | 5 | * you may not use this file except in compliance with the License. |
avilei | 2:4ae769d0b112 | 6 | * You may obtain a copy of the License at |
avilei | 2:4ae769d0b112 | 7 | * |
avilei | 2:4ae769d0b112 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
avilei | 2:4ae769d0b112 | 9 | * |
avilei | 2:4ae769d0b112 | 10 | * Unless required by applicable law or agreed to in writing, software |
avilei | 2:4ae769d0b112 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
avilei | 2:4ae769d0b112 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
avilei | 2:4ae769d0b112 | 13 | * See the License for the specific language governing permissions and |
avilei | 2:4ae769d0b112 | 14 | * limitations under the License. |
avilei | 2:4ae769d0b112 | 15 | */ |
avilei | 2:4ae769d0b112 | 16 | |
avilei | 2:4ae769d0b112 | 17 | /** |
avilei | 2:4ae769d0b112 | 18 | ****************************************************************************** |
avilei | 2:4ae769d0b112 | 19 | * @file SPN7Driver.h |
avilei | 2:4ae769d0b112 | 20 | * @author STMicroelectronics |
avilei | 2:4ae769d0b112 | 21 | * @brief Header file for SPN7Driver based on BLDCmotorDriver class |
avilei | 2:4ae769d0b112 | 22 | ****************************************************************************** |
avilei | 2:4ae769d0b112 | 23 | * @copy |
avilei | 2:4ae769d0b112 | 24 | * |
avilei | 2:4ae769d0b112 | 25 | * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS |
avilei | 2:4ae769d0b112 | 26 | * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE |
avilei | 2:4ae769d0b112 | 27 | * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY |
avilei | 2:4ae769d0b112 | 28 | * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING |
avilei | 2:4ae769d0b112 | 29 | * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE |
avilei | 2:4ae769d0b112 | 30 | * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. |
avilei | 2:4ae769d0b112 | 31 | * |
avilei | 2:4ae769d0b112 | 32 | * <h2><center>© COPYRIGHT 2016 STMicroelectronics</center></h2> |
avilei | 2:4ae769d0b112 | 33 | */ |
avilei | 2:4ae769d0b112 | 34 | |
avilei | 7:022c306baeb9 | 35 | // This example is based on the BLDCmotorDriver motor control library |
avilei | 7:022c306baeb9 | 36 | // by the TVZ Mechatronics Team, University of Applied Sciences Zagreb, |
avilei | 7:022c306baeb9 | 37 | // Professional Study in Mechatronics: |
avilei | 7:022c306baeb9 | 38 | // https://developer.mbed.org/teams/TVZ-Mechatronics-Team/code/BLDCmotorDriver/ |
avilei | 7:022c306baeb9 | 39 | |
avilei | 2:4ae769d0b112 | 40 | #ifndef __SPN7DRIVER_H__ |
avilei | 2:4ae769d0b112 | 41 | #define __SPN7DRIVER_H__ |
avilei | 2:4ae769d0b112 | 42 | |
avilei | 2:4ae769d0b112 | 43 | #include "mbed.h" |
avilei | 2:4ae769d0b112 | 44 | #include "BLDCmotorDriver.h" |
avilei | 2:4ae769d0b112 | 45 | |
avilei | 2:4ae769d0b112 | 46 | class SPN7Driver : public BLDCmotorDriver { |
avilei | 2:4ae769d0b112 | 47 | public: |
avilei | 2:4ae769d0b112 | 48 | SPN7Driver(PinName pIN1, PinName pIN2, PinName pIN3, |
avilei | 2:4ae769d0b112 | 49 | PinName pEN1, PinName pEN2, PinName pEN3, |
avilei | 2:4ae769d0b112 | 50 | PinName pH1, PinName pH2, PinName pH3, |
avilei | 2:4ae769d0b112 | 51 | PinName pFault); |
avilei | 4:3f63eed73ad1 | 52 | void setDutyCycle(float dutyCycle); |
avilei | 2:4ae769d0b112 | 53 | |
avilei | 2:4ae769d0b112 | 54 | protected: |
avilei | 2:4ae769d0b112 | 55 | void commutation(); |
avilei | 2:4ae769d0b112 | 56 | }; |
avilei | 2:4ae769d0b112 | 57 | |
avilei | 2:4ae769d0b112 | 58 | #endif // __SPN7DRIVER_H__ |