Sensor Watch 0.0.2
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
Loading...
Searching...
No Matches
Functions
Digital Input and Output

This section covers functions related to general-purpose input and output signals. More...

Functions

void watch_enable_digital_input (const uint8_t pin)
 Configures the selected pin for digital input.
 
void watch_disable_digital_input (const uint8_t pin)
 Disables any digital input, along with any pull-up or pull-down configuration.
 
void watch_enable_pull_up (const uint8_t pin)
 Enables a pull-up resistor on the selected pin.
 
void watch_enable_pull_down (const uint8_t pin)
 Enables a pull-down resistor on the selected pin.
 
bool watch_get_pin_level (const uint8_t pin)
 Gets the level of the selected pin.
 
void watch_enable_digital_output (const uint8_t pin)
 Configures the selected pin for digital output.
 
void watch_disable_digital_output (const uint8_t pin)
 Disables digital output on the selected pin.
 
void watch_set_pin_level (const uint8_t pin, const bool level)
 Sets the level of the selected pin.
 

Detailed Description

This section covers functions related to general-purpose input and output signals.

Function Documentation

◆ watch_disable_digital_input()

void watch_disable_digital_input ( const uint8_t  pin)

Disables any digital input, along with any pull-up or pull-down configuration.

Parameters
pinThe pin that you wish to disable.

◆ watch_disable_digital_output()

void watch_disable_digital_output ( const uint8_t  pin)

Disables digital output on the selected pin.

Parameters
pinThe pin that you wish disable.

◆ watch_enable_digital_input()

void watch_enable_digital_input ( const uint8_t  pin)

Configures the selected pin for digital input.

Parameters
pinThe pin that you wish to act as an input.

◆ watch_enable_digital_output()

void watch_enable_digital_output ( const uint8_t  pin)

Configures the selected pin for digital output.

Parameters
pinThe pin that you wish to act as an output.

◆ watch_enable_pull_down()

void watch_enable_pull_down ( const uint8_t  pin)

Enables a pull-down resistor on the selected pin.

Parameters
pinThe pin that you wish to configure.

◆ watch_enable_pull_up()

void watch_enable_pull_up ( const uint8_t  pin)

Enables a pull-up resistor on the selected pin.

Parameters
pinThe pin that you wish to configure.

◆ watch_get_pin_level()

bool watch_get_pin_level ( const uint8_t  pin)

Gets the level of the selected pin.

Parameters
pinThe pin whose value you wish to read.
Returns
true if the pin was logic high; otherwise, false.

◆ watch_set_pin_level()

void watch_set_pin_level ( const uint8_t  pin,
const bool  level 
)

Sets the level of the selected pin.

Parameters
pinThe pin whose value you wish to set.
levelThe level you wish to set: true for high, false for low.