Function tc_init()

Initializes a hardware TC module instance.

enum status_code tc_init(
		struct tc_module *const module_inst,
		Tc *const hw,
		const struct tc_config *const config)

Enables the clock and initializes the TC module, based on the given configuration values.

Table 1. Parameters
Data direction Parameter name Description

[in, out]

module_inst

Pointer to the software module instance struct

[in]

hw

Pointer to the TC hardware module

[in]

config

Pointer to the TC configuration options struct

Returns

Status of the initialization procedure.

Table 2. Return Values
Return value Description

STATUS_OK

The module was initialized successfully

STATUS_BUSY

Hardware module was busy when the initialization procedure was attempted

STATUS_INVALID_ARG

An invalid configuration option or argument was supplied

STATUS_ERR_DENIED

Hardware module was already enabled, or the hardware module is configured in 32-bit slave mode