BeRTOS
Functions
phase.h File Reference

Phase partialization driver with TRIACs. More...

#include "hw/phase_map.h"
#include "cfg/cfg_phase.h"
#include <drv/timer.h>

Go to the source code of this file.

Typedefs

Types for duty and power.
typedef uint16_t triac_duty_t
typedef uint16_t triac_power_t

Functions

void phase_setDutyUnlock (TriacDev dev, triac_duty_t duty)
 Set duty of the triac channel dev (NOT INTERRUPT SAFE).
void phase_setDuty (TriacDev dev, triac_duty_t duty)
 Set duty of the triac channel dev (interrupt safe).
void phase_setPower (TriacDev dev, triac_power_t power)
 Set power of the triac channel dev (interrupt safe).
void phase_init (void)
 Initialize phase control driver.

Detailed Description

Phase partialization driver with TRIACs.

Author:
Francesco Sacchi <batt@develer.com>

Definition in file phase.h.


Function Documentation

void phase_setPower ( TriacDev  dev,
triac_power_t  power 
)

Set power of the triac channel dev (interrupt safe).

This function approsimate the sine wave to a triangular wave to compute RMS power.

Definition at line 128 of file phase.c.