Microchip® Advanced Software Framework

acc_example_canopus.c File Reference

Analog Comparator Controller (ACC) example for SAMV71/SAME70.

Copyright (c) 2015-2018 Microchip Technology Inc. and its subsidiaries.

#include "asf.h"
#include "stdio_serial.h"
#include "conf_board.h"
#include "conf_clock.h"

Macros

#define DACC_ANALOG_CONTROL
 Analog control value. More...
 
#define DACC_CHANNEL_0   0
 The DAC Channel value. More...
 
#define MAX_DIGITAL   (4095)
 The maximal digital value. More...
 
#define STRING_EOL   "\r"
 
#define STRING_HEADER
 
#define VOLT_REF   (3300)
 Reference voltage for DACC,in mv. More...
 

Functions

void ACC_Handler (void)
 Interrupt handler for the ACC. More...
 
static void configure_console (void)
 Configure UART console. More...
 
static void dsplay_menu (void)
 Display main menu. More...
 
static int16_t get_input_voltage (void)
 Get voltage from user input, the input range is: (1/6)*ADVREF~(5/6)*ADVREF (mv) More...
 
int main (void)
 ACC example application entry point. More...
 

#define DACC_ANALOG_CONTROL
Value:
(DACC_ACR_IBCTLCH0(0x02) \
| DACC_ACR_IBCTLCH1(0x02))

Analog control value.

Referenced by main().

#define DACC_CHANNEL_0   0

The DAC Channel value.

Referenced by main().

#define MAX_DIGITAL   (4095)

The maximal digital value.

Referenced by main().

#define STRING_EOL   "\r"
#define STRING_HEADER
Value:
"-- ACC IRQ Example --\r\n" \
"-- "BOARD_NAME" --\r\n" \
"-- Compiled: "__DATE__" "__TIME__" --"STRING_EOL
#define STRING_EOL
Definition: acc_example_canopus.c:109
#define BOARD_NAME
Name of the board.
Definition: same70_xplained.h:75

Referenced by main().

#define VOLT_REF   (3300)

Reference voltage for DACC,in mv.

Referenced by get_input_voltage(), and main().

void ACC_Handler ( void  )

Interrupt handler for the ACC.

References acc_get_comparison_result(), and acc_get_interrupt_status().

static void configure_console ( void  )
static
static void dsplay_menu ( void  )
static

Display main menu.

Referenced by main().

static int16_t get_input_voltage ( void  )
static

Get voltage from user input, the input range is: (1/6)*ADVREF~(5/6)*ADVREF (mv)

References CONSOLE_UART, usart_read(), and VOLT_REF.

Referenced by main().