FreeHIL
Loading...
Searching...
No Matches
FH_PWMI09.c File Reference

File Map:
FH_Functions, Section FH_PWMI (PWM Input), Peripheral FH_PWMI09 (PWM Input 09)
(The PWMI09 (PWM Input 09) could be any interested PWM Input of the micro-controller on which FH source code is ported)
More...

Go to the source code of this file.

Functions

FH_ErrorInfo FH_PWMI_Init_PWMI09 (FH_RFCommunication_Message *fh_RFCommunication_Message)
 This function initializes the PWM Input 09
The PWM Input 09 could be any interested PWM Input of the micro-controller on which FH source code is ported
FH user should call the initialization function of the interested PWM Input here.
FH_ErrorInfo FH_PWMI_GetStatus_PWMI09 (FH_RFCommunication_Message *fh_RFCommunication_Message, uint32_t *fh_Frequency, uint8_t *fh_DutyCycle)
 This function reads the PWM Input 09
The PWM Input 09 could be any interested PWM Input of the micro-controller on which FH source code is ported
FH user should call the read function of the interested PWM Input here.

Detailed Description

File Map:
FH_Functions, Section FH_PWMI (PWM Input), Peripheral FH_PWMI09 (PWM Input 09)
(The PWMI09 (PWM Input 09) could be any interested PWM Input of the micro-controller on which FH source code is ported)

Note
To have a clean code, FH user should have the implementation of the initialization and read functions of the PWM Input 09 in a separate c file
Then FH user should include the header file (.h) of the related source file (.c) here
This header file shall include the following items:
The declaration of the initialization function of the PWM Input 09
The declaration of the read function of the PWM Input 09
Attention
There are a total number of 3 attentions (FH user defined code) in this file where FH user shall insert some code
Other parts could be left intact

SPDX-License-Identifier: Apache-2.0

Copyright 2026 Vahid Hasirchi

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

For more information refer to FreeHIL.com

Definition in file FH_PWMI09.c.

Function Documentation

◆ FH_PWMI_GetStatus_PWMI09()

FH_ErrorInfo FH_PWMI_GetStatus_PWMI09 ( FH_RFCommunication_Message * fh_RFCommunication_Message,
uint32_t * fh_Frequency,
uint8_t * fh_DutyCycle )

This function reads the PWM Input 09
The PWM Input 09 could be any interested PWM Input of the micro-controller on which FH source code is ported
FH user should call the read function of the interested PWM Input here.

Parameters
Data*Data will be set with the value of PWM Input 09
Returns
FH_ErrorInfo is returned
Note
To have a clean code, just include the related header file
Then just call the function here
  ==============================================================================
                        ##### RobotFramework Example #####
  ==============================================================================
  @{MessageData} =    Create List    ${PWMI09}
  &{Message}     =    Create Dictionary    DeviceAddress=${DeviceAddress_01}    Function=${Function_PWMI}    Command=${PWMI_Commands_GetStatus}    Data=@{MessageData}
  ${Result}    SendMessage    &{Message}

  Comments:

  PWMI09 => It indicates the PWM Input 09
  DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
  Function_PWMI => It is the function in the message frame
  PWMI_Commands_GetStatus => It is the command of the function in the message frame
Warning
To be able to read the PWM Input 09 of the micro-controller on which FH source code is ported, the FH_PWMI_Init_PWMI09 function shall be invoked once by RobotFramework firstly
In other words, before invoking FH_PWMI_GetStatus_PWMI09 function from RobotFramework, FH_PWMI_Init_PWMI09 function shall be invoked in order to initialize the PWM Input

Definition at line 140 of file FH_PWMI09.c.

References FH_ResetErrorInfo(), and fh_RFCommunication_Message.

◆ FH_PWMI_Init_PWMI09()

FH_ErrorInfo FH_PWMI_Init_PWMI09 ( FH_RFCommunication_Message * fh_RFCommunication_Message)

This function initializes the PWM Input 09
The PWM Input 09 could be any interested PWM Input of the micro-controller on which FH source code is ported
FH user should call the initialization function of the interested PWM Input here.

Parameters
None
Returns
FH_ErrorInfo is returned
Note
To have a clean code, just include the related header file
Then just call the function here
  ==============================================================================
                        ##### RobotFramework Example #####
  ==============================================================================
  @{MessageData} =    Create List    ${PWMI09}
  &{Message}     =    Create Dictionary    DeviceAddress=${DeviceAddress_01}    Function=${Function_PWMI}    Command=${PWMI_Commands_Init}    Data=@{MessageData}
  ${Result}    SendMessage    &{Message}

  Comments:

  PWMI09 => It indicates the PWM Input 09
  DeviceAddress_01 => It shall be equal to the address of the device: FH_RFCommunication_DeviceAddress
  Function_PWMI => It is the function in the message frame
  PWMI_Commands_Init => It is the command of the function in the message frame
Warning
To be able to read the PWM Input 09 of the micro-controller on which FH source code is ported, this function shall be invoked once by RobotFramework firstly
In other words, before invoking FH_PWMI_GetStatus_PWMI09 function from RobotFramework, this function shall be invoked in order to initialize the PWM Input

Definition at line 89 of file FH_PWMI09.c.

References FH_ResetErrorInfo(), and fh_RFCommunication_Message.