SmartCradle v1
Baby smart cradle
motor.h File Reference

Motor module header. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void initMotor ()
 Load the motor driver device driver. More...
 
void remMotor ()
 Remove the motor driver device driver. More...
 
int startMotor ()
 Start the motor. More...
 
int stopMotor ()
 Stop the motor. More...
 
_Bool getMotorStatus ()
 Get the Motor Status object. More...
 

Detailed Description

Motor module header.

Author
José Carvalho, João Carneiro
Date
2022-01-13

Definition in file motor.h.

Function Documentation

◆ getMotorStatus()

_Bool getMotorStatus ( )

Get the Motor Status object.

Returns
bool: Returns the status of the motor

Definition at line 79 of file motor.c.

◆ initMotor()

void initMotor ( )

Load the motor driver device driver.

Definition at line 22 of file motor.c.

◆ remMotor()

void remMotor ( )

Remove the motor driver device driver.

Definition at line 27 of file motor.c.

◆ startMotor()

int startMotor ( )

Start the motor.

Writes to the device driver so that the motor is enabled.

Returns
int: Returns 0 on error, or 1 if sucessful

Definition at line 31 of file motor.c.

◆ stopMotor()

int stopMotor ( )

Stop the motor.

Writes to the device driver so that the motor is disabled.

Returns
int: Returns 0 on error, or 1 if sucessful

Definition at line 55 of file motor.c.