remove asflib/components
This commit is contained in:
parent
4de4506db9
commit
be0c547976
|
@ -1,292 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Management of C42412A LCD Glass component.
|
||||
*
|
||||
* Copyright (c) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#include "slcd.h"
|
||||
#include "c42412a.h"
|
||||
#include "config_c42412a.h"
|
||||
#include <string.h>
|
||||
|
||||
const uint32_t charactor_map[] = {
|
||||
0x2e74,0x440,0x23c4,0x25c4,0x5e0,0x25a4,0x27a4,0x444,0x27e4,0x25e4, /*0-9*/
|
||||
0x7e4,0xa545,0x2224,0xa445,0x23a4,0x3a4,0x2724, /*A-G*/
|
||||
0x7e0,0xa005,0x2640,0x12b0,0x2220,0x678,0x1668, /*H-N*/
|
||||
0x2664,0x3e4,0x3664,0x13e4,0x25a4,0x8005, /*O-T*/
|
||||
0x2660,0xa30,0x1e60,0x1818,0x8018,0x2814 /*U-Z*/
|
||||
};
|
||||
const uint32_t num_map[10] = {0x2e74,0x440,0x23c4,0x25c4,0x5e0,0x25a4,0x27a4,0x444,0x27e4,0x25e4};
|
||||
|
||||
void c42412a_init(void)
|
||||
{
|
||||
struct slcd_config config;
|
||||
|
||||
slcd_get_config_defaults(&config);
|
||||
slcd_init(&config);
|
||||
|
||||
slcd_set_frame_counter(SLCD_FRAME_COUNTER_0,false,CONF_C42412A_FC0);
|
||||
slcd_set_frame_counter(SLCD_FRAME_COUNTER_1,false,CONF_C42412A_FC1);
|
||||
slcd_set_frame_counter(SLCD_FRAME_COUNTER_2,false,CONF_C42412A_FC2);
|
||||
slcd_set_contrast(CONF_C42412A_CONTRAST);
|
||||
slcd_enable();
|
||||
}
|
||||
|
||||
void c42412a_show_all(void)
|
||||
{
|
||||
slcd_set_display_memory();
|
||||
}
|
||||
|
||||
void c42412a_clear_all(void)
|
||||
{
|
||||
slcd_disable_blink();
|
||||
slcd_disable_circular_shift();
|
||||
slcd_clear_display_memory();
|
||||
}
|
||||
|
||||
void c42412a_show_text(const uint8_t *data)
|
||||
{
|
||||
Assert(data);
|
||||
uint32_t len = (uint32_t)strlen((char *) data);
|
||||
|
||||
len = (len > C42412A_MAX_CHAR) ? C42412A_MAX_CHAR : len;
|
||||
|
||||
slcd_character_map_set(SLCD_AUTOMATED_CHAR_START_FROM_BOTTOM_RIGHT,C42412A_CHAR_MAP_NUM_SEG-1);
|
||||
for(uint32_t i = 0 ; i < len ; i++) {
|
||||
if(data[i] >= '0' && data[i] <= '9') {
|
||||
slcd_character_write_data(0,C42412A_NUM_SEG_INDEX_S+i*C42412A_CHAR_MAP_NUM_SEG,
|
||||
charactor_map[data[i] - '0'],C42412A_DATA_MASK);
|
||||
} else if(data[i] >= 'A' && data[i] <= 'Z') {
|
||||
slcd_character_write_data(0,C42412A_NUM_SEG_INDEX_S+i*C42412A_CHAR_MAP_NUM_SEG,
|
||||
charactor_map[data[i] - 'A' +10],C42412A_DATA_MASK);
|
||||
} else if(data[i] >= 'a' && data[i] <= 'z') {
|
||||
slcd_character_write_data(0,C42412A_NUM_SEG_INDEX_S+i*C42412A_CHAR_MAP_NUM_SEG,
|
||||
charactor_map[data[i] - 'a' +10],C42412A_DATA_MASK);
|
||||
} else {
|
||||
slcd_character_write_data(0,C42412A_NUM_SEG_INDEX_S+i*C42412A_CHAR_MAP_NUM_SEG,
|
||||
charactor_map[0],C42412A_DATA_MASK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
void c42412a_clear_text(void)
|
||||
{
|
||||
slcd_character_map_set(SLCD_AUTOMATED_CHAR_START_FROM_BOTTOM_RIGHT,C42412A_CHAR_MAP_NUM_SEG-1);
|
||||
for(uint32_t i = 0 ; i < C42412A_MAX_CHAR ; i++) {
|
||||
slcd_character_write_data(0,C42412A_NUM_SEG_INDEX_S+i*C42412A_CHAR_MAP_NUM_SEG,0,C42412A_DATA_MASK);
|
||||
}
|
||||
}
|
||||
|
||||
void c42412a_show_icon(uint8_t icon_com, uint8_t icon_seg)
|
||||
{
|
||||
slcd_set_pixel(icon_com, icon_seg);
|
||||
}
|
||||
|
||||
void c42412a_clear_icon(uint8_t icon_com, uint8_t icon_seg)
|
||||
{
|
||||
slcd_clear_pixel(icon_com, icon_seg);
|
||||
}
|
||||
|
||||
void c42412a_blink_icon_start(uint8_t icon_com, uint8_t icon_seg)
|
||||
{
|
||||
if (icon_seg < 2) {
|
||||
slcd_disable();
|
||||
struct slcd_blink_config blink_config;
|
||||
slcd_blink_get_config_defaults(&blink_config);
|
||||
blink_config.blink_all_seg = false;
|
||||
blink_config.fc = CONF_C42412A_BLINK_TIMER;
|
||||
slcd_blink_set_config(&blink_config);
|
||||
slcd_set_pixel(icon_com, icon_seg);
|
||||
slcd_set_blink_pixel(icon_com, icon_seg);
|
||||
slcd_enable_frame_counter(CONF_C42412A_BLINK_TIMER);
|
||||
slcd_enable_blink();
|
||||
slcd_enable();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void c42412a_blink_icon_stop(uint8_t icon_com, uint8_t icon_seg)
|
||||
{
|
||||
if (icon_seg < 2) {
|
||||
slcd_disable_blink();
|
||||
slcd_disable();
|
||||
slcd_clear_blink_pixel(icon_com, icon_seg);
|
||||
slcd_enable_blink();
|
||||
slcd_enable();
|
||||
}
|
||||
}
|
||||
|
||||
void c42412a_blink_screen(void)
|
||||
{
|
||||
slcd_disable_blink();
|
||||
slcd_disable();
|
||||
struct slcd_blink_config blink_config;
|
||||
slcd_blink_get_config_defaults(&blink_config);
|
||||
blink_config.blink_all_seg = true;
|
||||
blink_config.fc = CONF_C42412A_BLINK_TIMER;
|
||||
slcd_blink_set_config(&blink_config);
|
||||
|
||||
slcd_enable_frame_counter(CONF_C42412A_BLINK_TIMER);
|
||||
slcd_enable_blink();
|
||||
slcd_enable();
|
||||
}
|
||||
|
||||
void c42412a_blink_disable(void)
|
||||
{
|
||||
slcd_disable_frame_counter(CONF_C42412A_BLINK_TIMER);
|
||||
slcd_disable_blink();
|
||||
}
|
||||
|
||||
void c42412a_set_contrast(uint8_t contrast)
|
||||
{
|
||||
slcd_set_contrast(contrast);
|
||||
}
|
||||
|
||||
void c42412a_show_battery(enum c42412a_battery_value val)
|
||||
{
|
||||
if (val <= C42412A_BATTERY_THREE )
|
||||
{
|
||||
slcd_clear_pixel(C42412A_ICON_BAT_LEVEL_1);
|
||||
slcd_clear_pixel(C42412A_ICON_BAT_LEVEL_2);
|
||||
slcd_clear_pixel(C42412A_ICON_BAT_LEVEL_3);
|
||||
slcd_set_pixel(C42412A_ICON_BAT);
|
||||
switch (val) {
|
||||
case C42412A_BATTERY_THREE:
|
||||
slcd_set_pixel(C42412A_ICON_BAT_LEVEL_3);
|
||||
case C42412A_BATTERY_TWO:
|
||||
slcd_set_pixel(C42412A_ICON_BAT_LEVEL_2);
|
||||
case C42412A_BATTERY_ONE:
|
||||
slcd_set_pixel(C42412A_ICON_BAT_LEVEL_1);
|
||||
break;
|
||||
case C42412A_BATTERY_NONE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void c42412a_show_wireless(enum c42412a_wireless_value val)
|
||||
{
|
||||
slcd_clear_pixel(C42412A_ICON_WLESS_LEVEL_1);
|
||||
slcd_clear_pixel(C42412A_ICON_WLESS_LEVEL_2);
|
||||
slcd_clear_pixel(C42412A_ICON_WLESS_LEVEL_3);
|
||||
slcd_set_pixel(C42412A_ICON_WLESS_LEVEL_0);
|
||||
switch (val) {
|
||||
case C42412A_WIRELESS_THREE:
|
||||
slcd_set_pixel(C42412A_ICON_WLESS_LEVEL_3);
|
||||
case C42412A_WIRELESS_TWO:
|
||||
slcd_set_pixel(C42412A_ICON_WLESS_LEVEL_2);
|
||||
case C42412A_WIRELESS_ONE:
|
||||
slcd_set_pixel(C42412A_ICON_WLESS_LEVEL_1);
|
||||
break;
|
||||
case C42412A_WIRELESS_NONE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void c42412a_show_numeric_dec(int32_t value)
|
||||
{
|
||||
uint32_t tmp=0;
|
||||
uint8_t i=0;
|
||||
Assert(value > -200000);
|
||||
Assert(value < 200000);
|
||||
|
||||
slcd_character_map_set(SLCD_AUTOMATED_CHAR_START_FROM_BOTTOM_RIGHT,C42412A_CHAR_MAP_NUM_SEG-1);
|
||||
|
||||
if(value < 0) {
|
||||
slcd_set_pixel(C42412A_ICON_MINUS);
|
||||
} else {
|
||||
slcd_clear_pixel(C42412A_ICON_MINUS);
|
||||
}
|
||||
|
||||
tmp = Abs(value);
|
||||
|
||||
if (tmp > 99999) {
|
||||
slcd_set_pixel(C42412A_ICON_MINUS_SEG1);
|
||||
slcd_set_pixel(C42412A_ICON_MINUS_SEG2);
|
||||
tmp -= 100000;
|
||||
} else {
|
||||
slcd_clear_pixel(C42412A_ICON_MINUS_SEG1);
|
||||
slcd_clear_pixel(C42412A_ICON_MINUS_SEG2);
|
||||
}
|
||||
|
||||
while(tmp != 0 && i <= C42412A_MAX_NUM){
|
||||
slcd_character_write_data(0,C42412A_NUM_SEG_INDEX_E - i*C42412A_CHAR_MAP_NUM_SEG,
|
||||
num_map[tmp%10],C42412A_DATA_MASK);
|
||||
tmp /=10;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
void c42412a_clear_numeric_dec(void)
|
||||
{
|
||||
slcd_clear_pixel(C42412A_ICON_MINUS);
|
||||
slcd_clear_pixel(C42412A_ICON_MINUS_SEG1);
|
||||
slcd_clear_pixel(C42412A_ICON_MINUS_SEG2);
|
||||
slcd_character_map_set(SLCD_AUTOMATED_CHAR_START_FROM_BOTTOM_RIGHT,C42412A_CHAR_MAP_NUM_SEG-1);
|
||||
for(uint32_t i = 0 ; i < C42412A_MAX_CHAR ; i++) {
|
||||
slcd_character_write_data(0,C42412A_NUM_SEG_INDEX_S+i*C42412A_CHAR_MAP_NUM_SEG,0,C42412A_DATA_MASK);
|
||||
}
|
||||
}
|
||||
|
||||
void c42412a_circular_animation_start(uint8_t size, uint8_t data)
|
||||
{
|
||||
struct slcd_circular_shift_config cfg;
|
||||
slcd_disable();
|
||||
slcd_circular_shift_get_config_defaults(&cfg);
|
||||
cfg.data = data;
|
||||
cfg.size = size;
|
||||
cfg.dir = C42412A_CSR_DIR;
|
||||
cfg.fc = CONF_C42412A_CIRCULAR_ANIMATION_TIMER;
|
||||
slcd_circular_shift_set_config(&cfg);
|
||||
slcd_enable_circular_shift();
|
||||
slcd_enable_frame_counter(CONF_C42412A_CIRCULAR_ANIMATION_TIMER);
|
||||
slcd_enable();
|
||||
}
|
||||
|
||||
void c42412a_circular_animation_stop(void)
|
||||
{
|
||||
slcd_disable_frame_counter(CONF_C42412A_CIRCULAR_ANIMATION_TIMER);
|
||||
slcd_disable_circular_shift();
|
||||
}
|
||||
|
|
@ -1,296 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Management of C42412A LCD Glass component.
|
||||
*
|
||||
* Copyright (c) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef C42412A_H_INCLUDED
|
||||
#define C42412A_H_INCLUDED
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \defgroup c42412a_display_group Atmel YMCC42412AAAFDCL LCD Glass component
|
||||
*
|
||||
* This is a driver for Atmel YMCC42412AAAFDCL LCD component.
|
||||
* This component is the custom LCD used for SAM4L-Xplained-Pro.
|
||||
* This driver provides functions for initialization and control of the
|
||||
* LCD segments.
|
||||
*
|
||||
* \section dependencies Dependencies
|
||||
* This driver depends on the following modules:
|
||||
* - SLCD driver.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \name Value for battery Icon setting
|
||||
* @{
|
||||
*/
|
||||
enum c42412a_battery_value {
|
||||
C42412A_BATTERY_NONE = 0,
|
||||
C42412A_BATTERY_ONE,
|
||||
C42412A_BATTERY_TWO,
|
||||
C42412A_BATTERY_THREE,
|
||||
};
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name Value for wireless Icon setting
|
||||
* @{
|
||||
*/
|
||||
enum c42412a_wireless_value {
|
||||
C42412A_WIRELESS_NONE = 0,
|
||||
C42412A_WIRELESS_ONE,
|
||||
C42412A_WIRELESS_TWO,
|
||||
C42412A_WIRELESS_THREE,
|
||||
};
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name Function Prototypes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Initialize the C42412A LCD Glass component.
|
||||
*
|
||||
* This function initializes the LCD driver to control the LCD glass.
|
||||
* It perform LCD module intialization according to the C42412A characteristics.
|
||||
*
|
||||
*/
|
||||
void c42412a_init(void);
|
||||
|
||||
/**
|
||||
* \brief Show text on C42412A LCD glass alphanumeric field.
|
||||
*
|
||||
* This function will show text on the alphanumeric field of the LCD glass.
|
||||
*
|
||||
* \param data Pointer to the input string(max length is 5)
|
||||
*/
|
||||
void c42412a_show_text(const uint8_t *data);
|
||||
|
||||
/**
|
||||
* \brief Clear C42412A LCD glass alphanumeric field.
|
||||
*
|
||||
* This function will clear the alphanumeric field of the LCD glass.
|
||||
*/
|
||||
void c42412a_clear_text(void);
|
||||
|
||||
/**
|
||||
* \brief Clear a specific icon on the LCD glass.
|
||||
*
|
||||
* This function will clear a specific icon.
|
||||
*
|
||||
* \param icon_com Pixel coordinate - COMx - of the icon.
|
||||
* \param icon_seg Pixel coordinate - SEGy - of the icon.
|
||||
*
|
||||
* \note Use the icon define in header file.
|
||||
*/
|
||||
void c42412a_clear_icon(uint8_t icon_com, uint8_t icon_seg);
|
||||
|
||||
/**
|
||||
* \brief Show a specific icon on the LCD glass.
|
||||
*
|
||||
* This function will show a specific icon.
|
||||
*
|
||||
* \param icon_com Pixel coordinate - COMx - of the icon.
|
||||
* \param icon_seg Pixel coordinate - SEGy - of the icon.
|
||||
*
|
||||
* \note Use the icon define in header file.
|
||||
*/
|
||||
void c42412a_show_icon(uint8_t icon_com, uint8_t icon_seg);
|
||||
|
||||
/**
|
||||
* \brief Blink a specific icon on the LCD glass.
|
||||
*
|
||||
* This function will blink a specific icon.
|
||||
*
|
||||
* \param icon_com Pixel coordinate - COMx - of the icon.
|
||||
* \param icon_seg Pixel coordinate - SEGy - of the icon.
|
||||
*
|
||||
* \note Use the icon define in header file(with selected segments
|
||||
* blinking feature).
|
||||
*/
|
||||
void c42412a_blink_icon_start(uint8_t icon_com, uint8_t icon_seg);
|
||||
|
||||
/**
|
||||
* \brief Stop blink a specific icon on the LCD glass.
|
||||
*
|
||||
* This function will stop blink a specific icon.
|
||||
*
|
||||
* \param icon_com Pixel coordinate - COMx - of the icon.
|
||||
* \param icon_seg Pixel coordinate - SEGy - of the icon.
|
||||
*
|
||||
* \note Use the icon define in header file(with selected segments
|
||||
* blinking feature).
|
||||
*/
|
||||
void c42412a_blink_icon_stop(uint8_t icon_com, uint8_t icon_seg);
|
||||
|
||||
/**
|
||||
* \brief Blink the current screen content.
|
||||
*
|
||||
* This function will make the current screen blink.
|
||||
*
|
||||
*/
|
||||
void c42412a_blink_screen(void);
|
||||
|
||||
/**
|
||||
* \brief Disable all Blink.
|
||||
*
|
||||
* This function will disable all Blink content.
|
||||
*
|
||||
*/
|
||||
void c42412a_blink_disable(void);
|
||||
|
||||
/**
|
||||
* \brief Set the C42412A LCD glass contrast.
|
||||
*
|
||||
* This function allows to adjust the contrast of the C42412A LCD glass.
|
||||
*
|
||||
* \param contrast Contrast vlaue [0-0xff].
|
||||
*/
|
||||
void c42412a_set_contrast(uint8_t contrast);
|
||||
|
||||
/**
|
||||
* \brief Scrolling start.
|
||||
*
|
||||
* This function start the text scrolling.
|
||||
*
|
||||
* \param data Data string buffer.
|
||||
* \param length Data string length.
|
||||
*/
|
||||
void c42412a_text_scrolling_start(const uint8_t *data, uint32_t length);
|
||||
|
||||
/**
|
||||
* \brief Scrolling stop.
|
||||
*
|
||||
* This function stop the text scrolling.
|
||||
*/
|
||||
void c42412a_text_scrolling_stop(void);
|
||||
|
||||
/**
|
||||
* \brief Show all content of the LCD glass.
|
||||
*
|
||||
* This function sets all pixels and areas of the LCD glass C42412A.
|
||||
*
|
||||
*/
|
||||
void c42412a_show_all(void);
|
||||
|
||||
/**
|
||||
* \brief Clear all content of the LCD glass.
|
||||
*
|
||||
* This function clears all pixels and areas of the LCD glass C42412A.
|
||||
*
|
||||
*/
|
||||
void c42412a_clear_all(void);
|
||||
|
||||
/**
|
||||
* \brief Show a decimal numeric value to LCD glass.
|
||||
*
|
||||
* This function displays an int32 value to the LCD numeric field of the glass.
|
||||
*
|
||||
* \param value The int32_t value to be displayed
|
||||
*
|
||||
* \note The value range is [-199999,199999].
|
||||
*/
|
||||
void c42412a_show_numeric_dec(int32_t value);
|
||||
|
||||
/**
|
||||
* \brief Clear C42412A LCD glass numeric field and the three
|
||||
* C42412A_ICON_MINUS*** icons.
|
||||
*
|
||||
* This function will clear the numeric field of the LCD glass.
|
||||
*/
|
||||
void c42412a_clear_numeric_dec(void);
|
||||
|
||||
/**
|
||||
* \brief Show battery condition by the battery icons on the LCD glass.
|
||||
*
|
||||
* This function allows to Show battery condition by the battery icons
|
||||
* on the LCD glass..
|
||||
*
|
||||
* \param val The 0 to 3 value which show the battery condition.
|
||||
*/
|
||||
void c42412a_show_battery(enum c42412a_battery_value val);
|
||||
|
||||
/**
|
||||
* \brief Show wireless signal condition by the wireless icons on the LCD glass.
|
||||
*
|
||||
* This function allows to Show wireless signal condition by the wireless icons
|
||||
* on the LCD glass..
|
||||
*
|
||||
* \param val The 0 to 3 value which show the wireless signal condition.
|
||||
*/
|
||||
void c42412a_show_wireless(enum c42412a_wireless_value val);
|
||||
|
||||
/**
|
||||
* \brief Start autonomous segment animation.
|
||||
*
|
||||
* \param val The 0 to 3 value which show the wireless signal condition.
|
||||
*
|
||||
* \param size Shift data size.
|
||||
* \param data Shift data.
|
||||
*/
|
||||
|
||||
void c42412a_circular_animation_start(uint8_t size, uint8_t data);
|
||||
|
||||
/**
|
||||
* \brief Stop autonomous segment animation.
|
||||
*
|
||||
*/
|
||||
void c42412a_circular_animation_stop(void);
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* C42412A_H_INCLUDED */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,58 +0,0 @@
|
|||
|
||||
/**
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
* \mainpage
|
||||
*
|
||||
* \section intro Introduction
|
||||
* This documentation has been automatically generated, and documents the source
|
||||
* code found in the Atmel Software Framework (ASF). <p>
|
||||
* Use the above menu to navigate in the documentation, or use the links below: <br>
|
||||
* <ul>
|
||||
* <li> <a href="globals_func.html">Functions</a>
|
||||
* <li> <a href="annotated.html">Data structures</a>
|
||||
* <li> <a href="globals_type.html">Defines</a>
|
||||
* </ul>
|
||||
*
|
||||
* \section main_licence License
|
||||
* <ul>
|
||||
* <li>\ref License
|
||||
* </ul>
|
||||
* \section contactinfo Contact Information
|
||||
* For further information, visit <a href="http://www.atmel.com/">Atmel</a>.\n
|
||||
*
|
||||
*/
|
|
@ -1,193 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief C42412A LCD Glass component example for SAM.
|
||||
*
|
||||
* Copyright (C) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \mainpage
|
||||
* \section intro Introduction
|
||||
* This is the documentation for the data structures, functions, variables,
|
||||
* defines, enums, and typedefs for the C42412A LCD Glass component example.
|
||||
* It also comes bundled with an application-example of usage.
|
||||
*
|
||||
* This example demonstrates how to use the C42412A LCD Glass driver.
|
||||
*
|
||||
* The supported board list:
|
||||
* - SAM L22 Xplained Pro
|
||||
*
|
||||
* \section compilinfo Compilation Information
|
||||
* This software is written for GNU GCC and IAR Embedded Workbench
|
||||
* for Atmel. Other compilers may or may not work.
|
||||
*
|
||||
* \section deviceinfo Device Information
|
||||
* The SEGMENT LCD1 Xplained Pro extension board must be connected to SAM devices.
|
||||
*
|
||||
* \section configinfo Configuration Information
|
||||
* - PC terminal settings:
|
||||
* - 115200 bps,
|
||||
* - 8 data bits,
|
||||
* - no parity bit,
|
||||
* - 1 stop bit,
|
||||
* - no flow control.
|
||||
*
|
||||
* \section contactinfo Contact Information
|
||||
* For further information, visit
|
||||
* <A href="http://www.atmel.com">Atmel</A>.\n
|
||||
* Support and FAQ: http://www.atmel.com/design-support/
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#include <asf.h>
|
||||
#include <string.h>
|
||||
#include "config_c42412a.h"
|
||||
struct usart_module usart_instance;
|
||||
|
||||
/**
|
||||
* Configure serial console.
|
||||
*/
|
||||
static void configure_console(void)
|
||||
{
|
||||
struct usart_config config_usart;
|
||||
usart_get_config_defaults(&config_usart);
|
||||
config_usart.baudrate = 38400;
|
||||
config_usart.mux_setting = EDBG_CDC_SERCOM_MUX_SETTING;
|
||||
config_usart.pinmux_pad0 = EDBG_CDC_SERCOM_PINMUX_PAD0;
|
||||
config_usart.pinmux_pad1 = EDBG_CDC_SERCOM_PINMUX_PAD1;
|
||||
config_usart.pinmux_pad2 = EDBG_CDC_SERCOM_PINMUX_PAD2;
|
||||
config_usart.pinmux_pad3 = EDBG_CDC_SERCOM_PINMUX_PAD3;
|
||||
stdio_serial_init(&usart_instance, EDBG_CDC_MODULE, &config_usart);
|
||||
usart_enable(&usart_instance);
|
||||
}
|
||||
|
||||
static void c42412a_icon_test(void)
|
||||
{
|
||||
c42412a_show_icon(C42412A_ICON_COLON);
|
||||
delay_s(1);
|
||||
c42412a_show_battery(C42412A_BATTERY_THREE);
|
||||
delay_s(1);
|
||||
c42412a_show_battery(C42412A_BATTERY_ONE);
|
||||
delay_s(1);
|
||||
c42412a_show_wireless(C42412A_WIRELESS_THREE);
|
||||
delay_s(1);
|
||||
c42412a_show_wireless(C42412A_WIRELESS_TWO);
|
||||
delay_s(1);
|
||||
c42412a_show_icon(C42412A_ICON_AUDIO_PLAY);
|
||||
delay_s(1);
|
||||
c42412a_clear_icon(C42412A_ICON_COLON);
|
||||
}
|
||||
static void c42412a_blink_test(void)
|
||||
{
|
||||
c42412a_blink_icon_start(C42412A_ICON_USB);
|
||||
c42412a_blink_icon_start(C42412A_ICON_ATMEL);
|
||||
delay_s(1);
|
||||
c42412a_blink_icon_stop(C42412A_ICON_USB);
|
||||
}
|
||||
static void c42412a_text_test(void)
|
||||
{
|
||||
c42412a_clear_text();
|
||||
c42412a_show_text((const uint8_t *)"Hi");
|
||||
delay_s(1);
|
||||
c42412a_clear_text();
|
||||
c42412a_show_text((const uint8_t *)"Hello");
|
||||
delay_s(1);
|
||||
c42412a_clear_text();
|
||||
c42412a_show_text((const uint8_t *)"Atmel");
|
||||
}
|
||||
|
||||
static void c42412a_num_dec_test(void)
|
||||
{
|
||||
c42412a_clear_numeric_dec();
|
||||
c42412a_show_numeric_dec(12);
|
||||
delay_s(1);
|
||||
c42412a_clear_numeric_dec();
|
||||
c42412a_show_numeric_dec(345);
|
||||
delay_s(1);
|
||||
c42412a_clear_numeric_dec();
|
||||
c42412a_show_numeric_dec(6789);
|
||||
delay_s(1);
|
||||
c42412a_clear_numeric_dec();
|
||||
c42412a_show_numeric_dec(-98765);
|
||||
delay_s(1);
|
||||
c42412a_clear_numeric_dec();
|
||||
c42412a_show_numeric_dec(-198765);
|
||||
}
|
||||
|
||||
static void c42412a_animation_test(void)
|
||||
{
|
||||
c42412a_circular_animation_start(8,0x0f);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief main function : do init and loop
|
||||
*/
|
||||
int main(void)
|
||||
{
|
||||
system_init();
|
||||
configure_console();
|
||||
delay_init();
|
||||
|
||||
/* Turn on the backlight. */
|
||||
port_pin_set_output_level(SLCD_BACLKLIGHT,true);
|
||||
|
||||
printf("Start SLCD test\r\n");
|
||||
/* Initialize the C42412A LCD glass component. */
|
||||
c42412a_init();
|
||||
|
||||
c42412a_show_all();
|
||||
c42412a_set_contrast(0x8);
|
||||
delay_s(1);
|
||||
c42412a_clear_all();
|
||||
|
||||
c42412a_icon_test();
|
||||
delay_s(1);
|
||||
c42412a_blink_test();
|
||||
delay_s(1);
|
||||
c42412a_text_test();
|
||||
delay_s(1);
|
||||
c42412a_num_dec_test();
|
||||
delay_s(1);
|
||||
c42412a_animation_test();
|
||||
while (1) {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM L22 Xplained Pro board configuration.
|
||||
*
|
||||
* Copyright (c) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef CONF_BOARD_H_INCLUDED
|
||||
#define CONF_BOARD_H_INCLUDED
|
||||
|
||||
#endif /* CONF_BOARD_H_INCLUDED */
|
|
@ -1,171 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM L22 Clock configuration
|
||||
*
|
||||
* Copyright (C) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#include <clock.h>
|
||||
|
||||
#ifndef CONF_CLOCKS_H_INCLUDED
|
||||
# define CONF_CLOCKS_H_INCLUDED
|
||||
|
||||
/* System clock bus configuration */
|
||||
# define CONF_CLOCK_FLASH_WAIT_STATES 0
|
||||
# define CONF_CLOCK_CPU_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_BACKUP_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC16M configuration - Internal 16MHz oscillator */
|
||||
# define CONF_CLOCK_OSC16M_FREQ_SEL SYSTEM_OSC16M_4M
|
||||
# define CONF_CLOCK_OSC16M_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC16M_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC configuration - External clock/oscillator */
|
||||
# define CONF_CLOCK_XOSC_ENABLE false
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY 12000000UL
|
||||
# define CONF_CLOCK_XOSC_STARTUP_TIME SYSTEM_XOSC_STARTUP_32768
|
||||
# define CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL true
|
||||
# define CONF_CLOCK_XOSC_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_XOSC_CLOCK_FAILURE_DETECT false
|
||||
# define CONF_CLOCK_XOSC_CLOCK_FAILURE_DIV SYSTEM_CFD_DIV_128
|
||||
# define CONF_CLOCK_XOSC_CLOCK_FAILURE_EVENT_OUT false
|
||||
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC32K configuration - External 32KHz crystal/clock oscillator */
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE false
|
||||
# define CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC32K_STARTUP_TIME SYSTEM_XOSC32K_STARTUP_65536
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT false
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_XOSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC32K_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_XOSC32K_CLOCK_FAILURE_DETECT false
|
||||
# define CONF_CLOCK_XOSC32K_CLOCK_FAILURE_DIV SYSTEM_CFD_DIV_1
|
||||
# define CONF_CLOCK_XOSC32K_CLOCK_FAILURE_EVENT_OUT false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSCULP32K configuration - Internal Ultra Low Power 32KHz oscillator */
|
||||
# define CONF_CLOCK_OSCULP32K_ENABLE_1KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSCULP32K_ENABLE_32KHZ_OUTPUT true
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DFLL configuration - Digital Frequency Locked Loop */
|
||||
# define CONF_CLOCK_DFLL_ENABLE false
|
||||
# define CONF_CLOCK_DFLL_LOOP_MODE SYSTEM_CLOCK_DFLL_LOOP_MODE_OPEN
|
||||
# define CONF_CLOCK_DFLL_ON_DEMAND false
|
||||
# define CONF_CLOCK_DFLL_RUN_IN_STANDBY false
|
||||
|
||||
/* DFLL open loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_FINE_VALUE (512)
|
||||
|
||||
/* DFLL closed loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
# define CONF_CLOCK_DFLL_MULTIPLY_FACTOR (48000000 / 32768)
|
||||
# define CONF_CLOCK_DFLL_QUICK_LOCK true
|
||||
# define CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK true
|
||||
# define CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP true
|
||||
# define CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE true
|
||||
# define CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE (0x1f / 4)
|
||||
# define CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE (0xff / 4)
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DPLL configuration - Digital Phase-Locked Loop */
|
||||
# define CONF_CLOCK_DPLL_ENABLE false
|
||||
# define CONF_CLOCK_DPLL_ON_DEMAND true
|
||||
# define CONF_CLOCK_DPLL_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_DPLL_LOCK_BYPASS false
|
||||
# define CONF_CLOCK_DPLL_WAKE_UP_FAST false
|
||||
# define CONF_CLOCK_DPLL_LOW_POWER_ENABLE false
|
||||
|
||||
# define CONF_CLOCK_DPLL_LOCK_TIME SYSTEM_CLOCK_SOURCE_DPLL_LOCK_TIME_DEFAULT
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_CLOCK SYSTEM_CLOCK_SOURCE_DPLL_REFERENCE_CLOCK_XOSC32K
|
||||
# define CONF_CLOCK_DPLL_FILTER SYSTEM_CLOCK_SOURCE_DPLL_FILTER_DEFAULT
|
||||
# define CONF_CLOCK_DPLL_PRESCALER SYSTEM_CLOCK_SOURCE_DPLL_DIV_1
|
||||
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_FREQUENCY 32768
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_DIVIDER 1
|
||||
# define CONF_CLOCK_DPLL_OUTPUT_FREQUENCY 48000000
|
||||
|
||||
/* DPLL GCLK reference configuration */
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
/* DPLL GCLK lock timer configuration */
|
||||
# define CONF_CLOCK_DPLL_LOCK_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
|
||||
/* Set this to true to configure the GCLK when running clocks_init. If set to
|
||||
* false, none of the GCLK generators will be configured in clocks_init(). */
|
||||
# define CONF_CLOCK_CONFIGURE_GCLK true
|
||||
|
||||
/* Configure GCLK generator 0 (Main Clock) */
|
||||
# define CONF_CLOCK_GCLK_0_ENABLE true
|
||||
# define CONF_CLOCK_GCLK_0_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_0_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_0_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_0_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 1 */
|
||||
# define CONF_CLOCK_GCLK_1_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_1_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_1_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_XOSC32K
|
||||
# define CONF_CLOCK_GCLK_1_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_1_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 2 */
|
||||
# define CONF_CLOCK_GCLK_2_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_2_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_2_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_2_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_2_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 3 */
|
||||
# define CONF_CLOCK_GCLK_3_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_3_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_3_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 4 */
|
||||
# define CONF_CLOCK_GCLK_4_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_4_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_4_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_4_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_4_OUTPUT_ENABLE false
|
||||
|
||||
#endif /* CONF_CLOCKS_H_INCLUDED */
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM SLCD Driver Configuration Header
|
||||
*
|
||||
* Copyright (C) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#ifndef CONF_SLCD_H_INCLUDED
|
||||
#define CONF_SLCD_H_INCLUDED
|
||||
|
||||
/** Select SLCD clock. Use 32.768KHz OSCULP32K or XOSC32K for SLCD clock.
|
||||
* 0 : From OSCULP32K
|
||||
* 1 : From XOSC32K
|
||||
*/
|
||||
#define CONF_SLCD_CLOCK_SOURCE 0
|
||||
|
||||
/** SLCD Duty Setting
|
||||
* 0:Static duty
|
||||
* 1:1/2 duty
|
||||
* 2:1/3 duty
|
||||
* 3:1/4 duty
|
||||
*/
|
||||
#define CONF_SLCD_DUTY 3
|
||||
|
||||
/**
|
||||
* SLCD Bias Setting.
|
||||
* 0:Static bias
|
||||
* 1:1/2 bias
|
||||
* 2:1/3 bias
|
||||
* 3:1/4 bias
|
||||
*/
|
||||
#define CONF_SLCD_BIAS 2
|
||||
|
||||
/**
|
||||
* SLCD Frame Frequency.
|
||||
* The optimal frame frequency should be in range from 30Hz up to 100Hz
|
||||
* to avoid flickering and ghosting effect.
|
||||
* To get the frame frequency, CLK_SLCD_OSC is first divided by a prescaler
|
||||
* from 16 to 128 then divided by 1 up to 8 as following.
|
||||
*
|
||||
* FrameRate = CLK_SLCD_OSC / (PVAL*(CKDIV+1)(DUTY+1))
|
||||
*
|
||||
* SLCD Prescaler Value (PVAL).
|
||||
* 0 : 16 prescaler
|
||||
* 1 : 32 prescaler
|
||||
* 2 : 64 prescaler
|
||||
* 3 : 128 prescaler
|
||||
*
|
||||
* SLCD Clock divider (CKDIV)
|
||||
* 0 : CKDIV is 0
|
||||
* 1 : CKDIV is 1
|
||||
* 2 : CKDIV is 2
|
||||
* 3 : CKDIV is 3
|
||||
* 4 : CKDIV is 4
|
||||
* 5 : CKDIV is 5
|
||||
* 6 : CKDIV is 6
|
||||
* 7 : CKDIV is 7
|
||||
*/
|
||||
#define CONF_SLCD_PVAL 0
|
||||
#define CONF_SLCD_CKDIV 7
|
||||
|
||||
/** Internal/External VLCD selection.
|
||||
* 0 : Internal VLCD generation
|
||||
* 1 : External VLCD generation
|
||||
*/
|
||||
#define CONF_SLCD_VLCD_SEL 0
|
||||
|
||||
/** Reference refresh frequency.
|
||||
* 0: Bias Reference refresh frequency is 2KHz
|
||||
* 1: Bias Reference refresh frequency is 1KHz
|
||||
* 2: Bias Reference refresh frequency is 500Hz
|
||||
* 3: Bias Reference refresh frequency is 250Hz
|
||||
* 4: Bias Reference refresh frequency is 125Hz
|
||||
* 5: Bias Reference refresh frequency is 62.5Hz
|
||||
*/
|
||||
#define CONF_SLCD_REF_REFRESH_FREQ 0
|
||||
|
||||
/** Power fefresh frequency.
|
||||
* 0: Charge pump refresh frequency is 2KHz
|
||||
* 1: Charge pump refresh frequency is 1KHz
|
||||
* 2: Charge pump refresh frequency is 500Hz
|
||||
* 3: Charge pump refresh frequency is 250Hz
|
||||
*/
|
||||
#define CONF_SLCD_POWER_REFRESH_FREQ 0
|
||||
|
||||
/** LCD Working Power Mode.
|
||||
* 0:LCD power automatically select regualation mode or pump mode.
|
||||
* 1:LCD power use step-up pump loop only.
|
||||
* 2:LCD power use step-down drop-out regulation loop only.
|
||||
*/
|
||||
#define CONF_SLCD_POWER_MODE 0
|
||||
|
||||
/** COM/SEG PIN Selection.
|
||||
* There are 52 LCD pins, but SLCD can drive up to 48 LCD pins which can be
|
||||
* individually enabled or disabled according to the LCD glass. The number of LCD pins
|
||||
* enabled should not be higher than the maximum of COM and SEG lines supported.
|
||||
* COM and SEG lines are always assigned in ascending order.
|
||||
* CONF_SLCD_PIN_L_MASK is pin mask [31,0]
|
||||
* CONF_SLCD_PIN_H_MASK is pin mask [51,32]
|
||||
*/
|
||||
#define CONF_SLCD_PIN_L_MASK 0xCFFFC3C0
|
||||
#define CONF_SLCD_PIN_H_MASK 0x00000FF0
|
||||
#endif
|
|
@ -1,135 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief C42412A configuration.
|
||||
*
|
||||
* Copyright (c) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
/** Configuration of the C42412A LCD glass driver */
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef CONF_C42412A_H_INCLUDED
|
||||
#define CONF_C42412A_H_INCLUDED
|
||||
#include "slcd.h"
|
||||
/**
|
||||
* \name Circular Animation Shift Direction
|
||||
* @{
|
||||
*/
|
||||
#define C42412A_CSR_DIR SLCD_CIRCULAR_SHIFT_RIGHT
|
||||
/** @} */
|
||||
|
||||
|
||||
/** Init contrast configuration, it's wthin [0-15]. */
|
||||
#define CONF_C42412A_CONTRAST 0xf
|
||||
|
||||
|
||||
/** Frame count 0 configuration.
|
||||
Prescaler is not bypassed,the overflow value is (CONF_C42412A_FC0+1).
|
||||
*/
|
||||
#define CONF_C42412A_FC0 2
|
||||
/** Frame count 0 configuration.
|
||||
Prescaler is not bypassed,the overflow value is (CONF_C42412A_FC0+1).
|
||||
*/
|
||||
#define CONF_C42412A_FC1 2
|
||||
/** Frame count 0 configuration.
|
||||
Prescaler is not bypassed,the overflow value is (CONF_C42412A_FC0+1).
|
||||
*/
|
||||
#define CONF_C42412A_FC2 1
|
||||
|
||||
/** Blink timer configuration. */
|
||||
#define CONF_C42412A_BLINK_TIMER SLCD_FRAME_COUNTER_0
|
||||
|
||||
/** Circular animation configuration. */
|
||||
#define CONF_C42412A_CIRCULAR_ANIMATION_TIMER SLCD_FRAME_COUNTER_0
|
||||
|
||||
|
||||
#define C42412A_NB_OF_COM 4
|
||||
#define C42412A_NB_OF_SEG 24
|
||||
|
||||
#define C42412A_NUM_SEG_INDEX_S 4
|
||||
#define C42412A_NUM_SEG_INDEX_E 20
|
||||
|
||||
#define C42412A_CHAR_MAP_NUM_SEG 4
|
||||
#define C42412A_DATA_MASK 0xFF4002
|
||||
|
||||
#define C42412A_HOUR_SEG_S 16
|
||||
#define C42412A_MIN_SEG_S 18
|
||||
|
||||
|
||||
#define C42412A_MAX_CHAR 5
|
||||
#define C42412A_MAX_NUM 5
|
||||
|
||||
/**
|
||||
* \name LCD component C42364A segment map default definitions
|
||||
* @{
|
||||
*/
|
||||
/* Icon with selected segments blinking feature */
|
||||
#define C42412A_ICON_USB 1, 1
|
||||
#define C42412A_ICON_COLON 3, 1
|
||||
#define C42412A_ICON_BAT 0, 0
|
||||
#define C42412A_ICON_ATMEL 0, 1
|
||||
/* Icon without selected segments blinking feature */
|
||||
#define C42412A_ICON_MINUS 0, 17
|
||||
#define C42412A_ICON_MINUS_SEG1 0, 13
|
||||
#define C42412A_ICON_MINUS_SEG2 0, 9
|
||||
#define C42412A_ICON_DOT_1 0, 5
|
||||
#define C42412A_ICON_DOT_2 3, 6
|
||||
#define C42412A_ICON_DOT_3 3, 10
|
||||
#define C42412A_ICON_DOT_4 3, 14
|
||||
#define C42412A_ICON_DOT_5 3, 18
|
||||
#define C42412A_ICON_BAT_LEVEL_1 2, 0
|
||||
#define C42412A_ICON_BAT_LEVEL_2 3, 0
|
||||
#define C42412A_ICON_BAT_LEVEL_3 1, 0
|
||||
#define C42412A_ICON_WLESS_LEVEL_0 3, 3
|
||||
#define C42412A_ICON_WLESS_LEVEL_1 3, 2
|
||||
#define C42412A_ICON_WLESS_LEVEL_2 2, 3
|
||||
#define C42412A_ICON_WLESS_LEVEL_3 2, 2
|
||||
#define C42412A_ICON_AUDIO_PLAY 2, 1
|
||||
#define C42412A_ICON_AM 0, 2
|
||||
#define C42412A_ICON_PM 0, 3
|
||||
#define C42412A_ICON_DEGREE_C 3, 22
|
||||
#define C42412A_ICON_DEGREE_F 0, 21
|
||||
#define C42412A_ICON_VOLT 1, 2
|
||||
#define C42412A_ICON_MILLI_VOLT 1, 3
|
||||
|
||||
/* @} */
|
||||
|
||||
#endif /* CONF_C42412A_H_INCLUDED */
|
File diff suppressed because one or more lines are too long
|
@ -1,52 +0,0 @@
|
|||
# List of available make goals:
|
||||
#
|
||||
# all Default target, builds the project
|
||||
# clean Clean up the project
|
||||
# rebuild Rebuild the project
|
||||
#
|
||||
#
|
||||
# doc Build the documentation
|
||||
# cleandoc Clean up the documentation
|
||||
# rebuilddoc Rebuild the documentation
|
||||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Include the common Makefile, which will also include the project specific
|
||||
# config.mk file.
|
||||
MAKEFILE_PATH = ../../../../../../../sam0/utils/make/Makefile.sam.in
|
||||
include $(MAKEFILE_PATH)
|
|
@ -1,111 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Polled API
|
||||
#include <sercom.h>
|
||||
|
||||
// From module: SERCOM USART - Serial Communications (Polled APIs)
|
||||
#include <usart.h>
|
||||
|
||||
// From module: SLCD - Segment Liquid Crystal Display Controller
|
||||
#include <slcd.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAML22
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver For SAML22
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM L21
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM L21
|
||||
#include <reset.h>
|
||||
|
||||
// From module: Segment LCD
|
||||
#include <c42412a.h>
|
||||
|
||||
// From module: Standard serial I/O (stdio)
|
||||
#include <stdio_serial.h>
|
||||
|
||||
// From module: USART - Serial interface- SAM implementation for devices with only USART
|
||||
#include <serial.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,170 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Path to top level ASF directory relative to this project directory.
|
||||
PRJ_PATH = ../../../../../../..
|
||||
|
||||
# Target CPU architecture: cortex-m3, cortex-m4
|
||||
ARCH = cortex-m0plus
|
||||
|
||||
# Target part: none, sam3n4 or sam4l4aa
|
||||
PART = saml22n18a
|
||||
|
||||
# Application target name. Given with suffix .a for library and .elf for a
|
||||
# standalone application.
|
||||
TARGET_FLASH = c42412a_example_flash.elf
|
||||
TARGET_SRAM = c42412a_example_sram.elf
|
||||
|
||||
# List of C source files.
|
||||
CSRCS = \
|
||||
common/utils/interrupt/interrupt_sam_nvic.c \
|
||||
common2/components/display/c42412a/c42412a.c \
|
||||
common2/components/display/c42412a/example/c42412a_example.c \
|
||||
common2/services/delay/sam0/systick_counter.c \
|
||||
sam0/boards/saml22_xplained_pro/board_init.c \
|
||||
sam0/drivers/port/port.c \
|
||||
sam0/drivers/sercom/sercom.c \
|
||||
sam0/drivers/sercom/usart/usart.c \
|
||||
sam0/drivers/slcd/slcd.c \
|
||||
sam0/drivers/system/clock/clock_saml22/clock.c \
|
||||
sam0/drivers/system/clock/clock_saml22/gclk.c \
|
||||
sam0/drivers/system/interrupt/system_interrupt.c \
|
||||
sam0/drivers/system/pinmux/pinmux.c \
|
||||
sam0/drivers/system/system.c \
|
||||
sam0/utils/cmsis/saml22/source/gcc/startup_saml22.c \
|
||||
sam0/utils/cmsis/saml22/source/system_saml22.c \
|
||||
sam0/utils/stdio/read.c \
|
||||
sam0/utils/stdio/write.c \
|
||||
sam0/utils/syscalls/gcc/syscalls.c
|
||||
|
||||
# List of assembler source files.
|
||||
ASSRCS =
|
||||
|
||||
# List of include paths.
|
||||
INC_PATH = \
|
||||
common/boards \
|
||||
common/services/serial \
|
||||
common/utils \
|
||||
common2/components/display/c42412a \
|
||||
common2/components/display/c42412a/example/saml22n18a_saml22_xplained_pro \
|
||||
common2/services/delay \
|
||||
common2/services/delay/sam0 \
|
||||
sam0/boards \
|
||||
sam0/boards/saml22_xplained_pro \
|
||||
sam0/drivers/port \
|
||||
sam0/drivers/sercom \
|
||||
sam0/drivers/sercom/usart \
|
||||
sam0/drivers/slcd \
|
||||
sam0/drivers/system \
|
||||
sam0/drivers/system/clock \
|
||||
sam0/drivers/system/clock/clock_saml22 \
|
||||
sam0/drivers/system/interrupt \
|
||||
sam0/drivers/system/interrupt/system_interrupt_saml22 \
|
||||
sam0/drivers/system/pinmux \
|
||||
sam0/drivers/system/power \
|
||||
sam0/drivers/system/power/power_sam_l \
|
||||
sam0/drivers/system/reset \
|
||||
sam0/drivers/system/reset/reset_sam_l \
|
||||
sam0/utils \
|
||||
sam0/utils/cmsis/saml22/include \
|
||||
sam0/utils/cmsis/saml22/source \
|
||||
sam0/utils/header_files \
|
||||
sam0/utils/preprocessor \
|
||||
sam0/utils/stdio/stdio_serial \
|
||||
thirdparty/CMSIS/Include \
|
||||
thirdparty/CMSIS/Lib/GCC \
|
||||
common2/components/display/c42412a/example/saml22n18a_saml22_xplained_pro/gcc
|
||||
|
||||
# Additional search paths for libraries.
|
||||
LIB_PATH = \
|
||||
thirdparty/CMSIS/Lib/GCC
|
||||
|
||||
# List of libraries to use during linking.
|
||||
LIBS = \
|
||||
arm_cortexM0l_math
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
LINKER_SCRIPT_FLASH = sam0/utils/linker_scripts/saml22/gcc/saml22n18a_flash.ld
|
||||
LINKER_SCRIPT_SRAM = sam0/utils/linker_scripts/saml22/gcc/saml22n18a_sram.ld
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
DEBUG_SCRIPT_FLASH = sam0/boards/saml22_xplained_pro/debug_scripts/gcc/saml22_xplained_pro_flash.gdb
|
||||
DEBUG_SCRIPT_SRAM = sam0/boards/saml22_xplained_pro/debug_scripts/gcc/saml22_xplained_pro_sram.gdb
|
||||
|
||||
# Project type parameter: all, sram or flash
|
||||
PROJECT_TYPE = flash
|
||||
|
||||
# Additional options for debugging. By default the common Makefile.in will
|
||||
# add -g3.
|
||||
DBGFLAGS =
|
||||
|
||||
# Application optimization used during compilation and linking:
|
||||
# -O0, -O1, -O2, -O3 or -Os
|
||||
OPTIMIZATION = -O1
|
||||
|
||||
# Extra flags to use when archiving.
|
||||
ARFLAGS =
|
||||
|
||||
# Extra flags to use when assembling.
|
||||
ASFLAGS =
|
||||
|
||||
# Extra flags to use when compiling.
|
||||
CFLAGS =
|
||||
|
||||
# Extra flags to use when preprocessing.
|
||||
#
|
||||
# Preprocessor symbol definitions
|
||||
# To add a definition use the format "-D name[=definition]".
|
||||
# To cancel a definition use the format "-U name".
|
||||
#
|
||||
# The most relevant symbols to define for the preprocessor are:
|
||||
# BOARD Target board in use, see boards/board.h for a list.
|
||||
# EXT_BOARD Optional extension board in use, see boards/board.h for a list.
|
||||
CPPFLAGS = \
|
||||
-D ARM_MATH_CM0PLUS=true \
|
||||
-D BOARD=SAML22_XPLAINED_PRO \
|
||||
-D SYSTICK_MODE \
|
||||
-D USART_CALLBACK_MODE=false \
|
||||
-D __SAML22N18A__
|
||||
|
||||
# Extra flags to use when linking
|
||||
LDFLAGS = \
|
||||
|
||||
# Pre- and post-build commands
|
||||
PREBUILD_CMD =
|
||||
POSTBUILD_CMD =
|
|
@ -1,111 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Polled API
|
||||
#include <sercom.h>
|
||||
|
||||
// From module: SERCOM USART - Serial Communications (Polled APIs)
|
||||
#include <usart.h>
|
||||
|
||||
// From module: SLCD - Segment Liquid Crystal Display Controller
|
||||
#include <slcd.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAML22
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver For SAML22
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM L21
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM L21
|
||||
#include <reset.h>
|
||||
|
||||
// From module: Segment LCD
|
||||
#include <c42412a.h>
|
||||
|
||||
// From module: Standard serial I/O (stdio)
|
||||
#include <stdio_serial.h>
|
||||
|
||||
// From module: USART - Serial interface- SAM implementation for devices with only USART
|
||||
#include <serial.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,6 +0,0 @@
|
|||
<workspace>
|
||||
<batchBuild></batchBuild>
|
||||
<project>
|
||||
<path>$WS_DIR$\c42412a_example_flash.ewp</path>
|
||||
</project>
|
||||
</workspace>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,135 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief C42412A configuration.
|
||||
*
|
||||
* Copyright (c) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
/** Configuration of the C42412A LCD glass driver */
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef CONF_C42412A_H_INCLUDED
|
||||
#define CONF_C42412A_H_INCLUDED
|
||||
#include "slcd.h"
|
||||
/**
|
||||
* \name Circular Animation Shift Direction
|
||||
* @{
|
||||
*/
|
||||
#define C42412A_CSR_DIR SLCD_CIRCULAR_SHIFT_RIGHT
|
||||
/** @} */
|
||||
|
||||
|
||||
/** Init contrast configuration, it's wthin [0-15]. */
|
||||
#define CONF_C42412A_CONTRAST 0xf
|
||||
|
||||
|
||||
/** Frame count 0 configuration.
|
||||
Prescaler is not bypassed,the overflow value is (CONF_C42412A_FC0+1).
|
||||
*/
|
||||
#define CONF_C42412A_FC0 2
|
||||
/** Frame count 0 configuration.
|
||||
Prescaler is not bypassed,the overflow value is (CONF_C42412A_FC0+1).
|
||||
*/
|
||||
#define CONF_C42412A_FC1 2
|
||||
/** Frame count 0 configuration.
|
||||
Prescaler is not bypassed,the overflow value is (CONF_C42412A_FC0+1).
|
||||
*/
|
||||
#define CONF_C42412A_FC2 1
|
||||
|
||||
/** Blink timer configuration. */
|
||||
#define CONF_C42412A_BLINK_TIMER SLCD_FRAME_COUNTER_0
|
||||
|
||||
/** Circular animation configuration. */
|
||||
#define CONF_C42412A_CIRCULAR_ANIMATION_TIMER SLCD_FRAME_COUNTER_0
|
||||
|
||||
|
||||
#define C42412A_NB_OF_COM 4
|
||||
#define C42412A_NB_OF_SEG 24
|
||||
|
||||
#define C42412A_NUM_SEG_INDEX_S 4
|
||||
#define C42412A_NUM_SEG_INDEX_E 20
|
||||
|
||||
#define C42412A_CHAR_MAP_NUM_SEG 4
|
||||
#define C42412A_DATA_MASK 0xFF4002
|
||||
|
||||
#define C42412A_HOUR_SEG_S 16
|
||||
#define C42412A_MIN_SEG_S 18
|
||||
|
||||
|
||||
#define C42412A_MAX_CHAR 5
|
||||
#define C42412A_MAX_NUM 5
|
||||
|
||||
/**
|
||||
* \name LCD component C42364A segment map default definitions
|
||||
* @{
|
||||
*/
|
||||
/* Icon with selected segments blinking feature */
|
||||
#define C42412A_ICON_USB 1, 1
|
||||
#define C42412A_ICON_COLON 3, 1
|
||||
#define C42412A_ICON_BAT 0, 0
|
||||
#define C42412A_ICON_ATMEL 0, 1
|
||||
/* Icon without selected segments blinking feature */
|
||||
#define C42412A_ICON_MINUS 0, 17
|
||||
#define C42412A_ICON_MINUS_SEG1 0, 13
|
||||
#define C42412A_ICON_MINUS_SEG2 0, 9
|
||||
#define C42412A_ICON_DOT_1 0, 5
|
||||
#define C42412A_ICON_DOT_2 3, 6
|
||||
#define C42412A_ICON_DOT_3 3, 10
|
||||
#define C42412A_ICON_DOT_4 3, 14
|
||||
#define C42412A_ICON_DOT_5 3, 18
|
||||
#define C42412A_ICON_BAT_LEVEL_1 2, 0
|
||||
#define C42412A_ICON_BAT_LEVEL_2 3, 0
|
||||
#define C42412A_ICON_BAT_LEVEL_3 1, 0
|
||||
#define C42412A_ICON_WLESS_LEVEL_0 3, 3
|
||||
#define C42412A_ICON_WLESS_LEVEL_1 3, 2
|
||||
#define C42412A_ICON_WLESS_LEVEL_2 2, 3
|
||||
#define C42412A_ICON_WLESS_LEVEL_3 2, 2
|
||||
#define C42412A_ICON_AUDIO_PLAY 2, 1
|
||||
#define C42412A_ICON_AM 0, 2
|
||||
#define C42412A_ICON_PM 0, 3
|
||||
#define C42412A_ICON_DEGREE_C 3, 22
|
||||
#define C42412A_ICON_DEGREE_F 0, 21
|
||||
#define C42412A_ICON_VOLT 1, 2
|
||||
#define C42412A_ICON_MILLI_VOLT 1, 3
|
||||
|
||||
/* @} */
|
||||
|
||||
#endif /* CONF_C42412A_H_INCLUDED */
|
|
@ -1,304 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Management of C8263A LCD Glass component.
|
||||
*
|
||||
* Copyright (c) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#include "slcd.h"
|
||||
#include "c8263a.h"
|
||||
#include "config_c8263a.h"
|
||||
#include <string.h>
|
||||
|
||||
const uint32_t charactor_map[] = {
|
||||
0xE85C, 0x2008, 0xA314, 0xA30C, 0x6308, 0xC30C, 0xC31C, 0xA008, 0xE31C, 0xE30C, /* 0-9 */
|
||||
0xE318, 0xA68C, 0xC014, 0xA48C, 0xC314, 0xC310, 0xC21C, /* A-G */
|
||||
0x6318, 0x8484, 0x201C, 0x4930, 0x4014, 0x7818, 0x7038, /* H-N */
|
||||
0xE01C, 0xE310, 0xE03C, 0xE330, 0xC30C, 0x8480, /* O-T */
|
||||
0x601C, 0x4850, 0x6078, 0x1860, 0x1880, 0x8844 /* U-Z */
|
||||
};
|
||||
const uint32_t num_map[10] = {0x77, 0x24, 0x5d, 0x6d, 0x2e, 0x6b, 0x7b, 0x25, 0x7f, 0x6f };
|
||||
|
||||
void c8263a_init(void)
|
||||
{
|
||||
struct slcd_config config;
|
||||
|
||||
slcd_get_config_defaults(&config);
|
||||
config.enable_bias_buffer = true;
|
||||
slcd_init(&config);
|
||||
|
||||
slcd_set_frame_counter(SLCD_FRAME_COUNTER_0,false,CONF_C8263A_FC0);
|
||||
slcd_set_frame_counter(SLCD_FRAME_COUNTER_1,false,CONF_C8263A_FC1);
|
||||
slcd_set_frame_counter(SLCD_FRAME_COUNTER_2,false,CONF_C8263A_FC2);
|
||||
slcd_set_contrast(CONF_C8263A_CONTRAST);
|
||||
slcd_enable();
|
||||
}
|
||||
|
||||
void c8263a_show_all(void)
|
||||
{
|
||||
slcd_set_display_memory();
|
||||
}
|
||||
|
||||
void c8263a_clear_all(void)
|
||||
{
|
||||
slcd_disable_blink();
|
||||
slcd_disable_circular_shift();
|
||||
slcd_clear_display_memory();
|
||||
}
|
||||
|
||||
void c8263a_show_text(const uint8_t *data)
|
||||
{
|
||||
Assert(data);
|
||||
uint32_t len = (uint32_t)strlen((char *) data);
|
||||
|
||||
len = (len > C8263A_MAX_CHAR) ? C8263A_MAX_CHAR : len;
|
||||
|
||||
slcd_character_map_set(SLCD_AUTOMATED_CHAR_START_FROM_BOTTOM_RIGHT,C8263A_CHAR_MAP_NUM_SEG-1);
|
||||
for(uint32_t i = 0 ; i < len ; i++) {
|
||||
if(data[i] >= '0' && data[i] <= '9') {
|
||||
slcd_character_write_data(0,C8263A_CHAR_SEG_INDEX_S+i*C8263A_CHAR_MAP_NUM_SEG,
|
||||
charactor_map[data[i] - '0'],C8263A_CHAR_MASK);
|
||||
} else if(data[i] >= 'A' && data[i] <= 'Z') {
|
||||
slcd_character_write_data(0,C8263A_CHAR_SEG_INDEX_S+i*C8263A_CHAR_MAP_NUM_SEG,
|
||||
charactor_map[data[i] - 'A' +10],C8263A_CHAR_MASK);
|
||||
} else if(data[i] >= 'a' && data[i] <= 'z') {
|
||||
slcd_character_write_data(0,C8263A_CHAR_SEG_INDEX_S+i*C8263A_CHAR_MAP_NUM_SEG,
|
||||
charactor_map[data[i] - 'a' +10],C8263A_CHAR_MASK);
|
||||
} else {
|
||||
slcd_character_write_data(0,C8263A_CHAR_SEG_INDEX_S+i*C8263A_CHAR_MAP_NUM_SEG,
|
||||
charactor_map[0],C8263A_CHAR_MASK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
void c8263a_clear_text(void)
|
||||
{
|
||||
slcd_character_map_set(SLCD_AUTOMATED_CHAR_START_FROM_BOTTOM_RIGHT,C8263A_CHAR_MAP_NUM_SEG-1);
|
||||
for(uint32_t i = 0 ; i < C8263A_MAX_CHAR ; i++) {
|
||||
slcd_character_write_data(0,C8263A_CHAR_SEG_INDEX_S+i*C8263A_CHAR_MAP_NUM_SEG,0,C8263A_CHAR_MASK);
|
||||
}
|
||||
}
|
||||
|
||||
void c8263a_show_icon(uint8_t icon_com, uint8_t icon_seg)
|
||||
{
|
||||
slcd_set_pixel(icon_com, icon_seg);
|
||||
}
|
||||
|
||||
void c8263a_clear_icon(uint8_t icon_com, uint8_t icon_seg)
|
||||
{
|
||||
slcd_clear_pixel(icon_com, icon_seg);
|
||||
}
|
||||
|
||||
void c8263a_blink_icon_start(uint8_t icon_com, uint8_t icon_seg)
|
||||
{
|
||||
if (icon_seg < 2) {
|
||||
slcd_disable();
|
||||
struct slcd_blink_config blink_config;
|
||||
slcd_blink_get_config_defaults(&blink_config);
|
||||
blink_config.blink_all_seg = false;
|
||||
blink_config.fc = CONF_C8263A_BLINK_TIMER;
|
||||
slcd_blink_set_config(&blink_config);
|
||||
slcd_set_pixel(icon_com, icon_seg);
|
||||
slcd_set_blink_pixel(icon_com, icon_seg);
|
||||
slcd_enable_frame_counter(CONF_C8263A_BLINK_TIMER);
|
||||
slcd_enable_blink();
|
||||
slcd_enable();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void c8263a_blink_icon_stop(uint8_t icon_com, uint8_t icon_seg)
|
||||
{
|
||||
if (icon_seg < 2) {
|
||||
slcd_disable_blink();
|
||||
slcd_disable();
|
||||
slcd_clear_blink_pixel(icon_com, icon_seg);
|
||||
slcd_enable_blink();
|
||||
slcd_enable();
|
||||
}
|
||||
}
|
||||
|
||||
void c8263a_blink_screen(void)
|
||||
{
|
||||
slcd_disable_blink();
|
||||
slcd_disable();
|
||||
struct slcd_blink_config blink_config;
|
||||
slcd_blink_get_config_defaults(&blink_config);
|
||||
blink_config.blink_all_seg = true;
|
||||
blink_config.fc = CONF_C8263A_BLINK_TIMER;
|
||||
slcd_blink_set_config(&blink_config);
|
||||
|
||||
slcd_enable_frame_counter(CONF_C8263A_BLINK_TIMER);
|
||||
slcd_enable_blink();
|
||||
slcd_enable();
|
||||
}
|
||||
|
||||
void c8263a_blink_disable(void)
|
||||
{
|
||||
slcd_disable_frame_counter(CONF_C8263A_BLINK_TIMER);
|
||||
slcd_disable_blink();
|
||||
}
|
||||
|
||||
void c8263a_set_contrast(uint8_t contrast)
|
||||
{
|
||||
slcd_set_contrast(contrast);
|
||||
}
|
||||
|
||||
void c8263a_show_battery(enum c8263a_battery_value val)
|
||||
{
|
||||
if (val <= C8263A_BATTERY_THREE )
|
||||
{
|
||||
slcd_clear_pixel(C8263A_ICON_BAT_LEVEL_1);
|
||||
slcd_clear_pixel(C8263A_ICON_BAT_LEVEL_2);
|
||||
slcd_clear_pixel(C8263A_ICON_BAT_LEVEL_3);
|
||||
slcd_set_pixel(C8263A_ICON_BAT);
|
||||
switch (val) {
|
||||
case C8263A_BATTERY_THREE:
|
||||
slcd_set_pixel(C8263A_ICON_BAT_LEVEL_3);
|
||||
case C8263A_BATTERY_TWO:
|
||||
slcd_set_pixel(C8263A_ICON_BAT_LEVEL_2);
|
||||
case C8263A_BATTERY_ONE:
|
||||
slcd_set_pixel(C8263A_ICON_BAT_LEVEL_1);
|
||||
break;
|
||||
case C8263A_BATTERY_NONE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void c8263a_show_wireless(enum c8263a_wireless_value val)
|
||||
{
|
||||
slcd_clear_pixel(C8263A_ICON_WLESS_LEVEL_1);
|
||||
slcd_clear_pixel(C8263A_ICON_WLESS_LEVEL_2);
|
||||
slcd_clear_pixel(C8263A_ICON_WLESS_LEVEL_3);
|
||||
slcd_set_pixel(C8263A_ICON_WLESS_LEVEL_0);
|
||||
switch (val) {
|
||||
case C8263A_WIRELESS_THREE:
|
||||
slcd_set_pixel(C8263A_ICON_WLESS_LEVEL_3);
|
||||
case C8263A_WIRELESS_TWO:
|
||||
slcd_set_pixel(C8263A_ICON_WLESS_LEVEL_2);
|
||||
case C8263A_WIRELESS_ONE:
|
||||
slcd_set_pixel(C8263A_ICON_WLESS_LEVEL_1);
|
||||
break;
|
||||
case C8263A_WIRELESS_NONE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void c8263a_show_numeric_dec(int32_t value)
|
||||
{
|
||||
uint32_t tmp=0;
|
||||
uint8_t i=0;
|
||||
Assert(value > -200000);
|
||||
Assert(value < 200000);
|
||||
|
||||
slcd_character_map_set(SLCD_AUTOMATED_CHAR_START_FROM_BOTTOM_RIGHT,C8263A_DIGITAL_MAP_NUM_SEG-1);
|
||||
|
||||
if(value < 0) {
|
||||
slcd_set_pixel(C8263A_ICON_MINUS);
|
||||
} else {
|
||||
slcd_clear_pixel(C8263A_ICON_MINUS);
|
||||
}
|
||||
|
||||
tmp = Abs(value);
|
||||
|
||||
if (tmp > 99999) {
|
||||
slcd_set_pixel(C8263A_ICON_MINUS_SEG1);
|
||||
slcd_set_pixel(C8263A_ICON_MINUS_SEG2);
|
||||
tmp -= 100000;
|
||||
} else {
|
||||
slcd_clear_pixel(C8263A_ICON_MINUS_SEG1);
|
||||
slcd_clear_pixel(C8263A_ICON_MINUS_SEG2);
|
||||
}
|
||||
|
||||
while(tmp != 0 && i < C8263A_MAX_DIGITAL){
|
||||
if (i == C8263A_MAX_DIGITAL - 1) {
|
||||
slcd_character_write_data(0,C8263A_DIGITAL_SEG_INDEX_E - i*C8263A_DIGITAL_MAP_NUM_SEG - 2,
|
||||
num_map[tmp%10],C8263A_DIGITAL_MASK);
|
||||
} else {
|
||||
slcd_character_write_data(0,C8263A_DIGITAL_SEG_INDEX_E - i*C8263A_DIGITAL_MAP_NUM_SEG,
|
||||
num_map[tmp%10],C8263A_DIGITAL_MASK);
|
||||
}
|
||||
tmp /=10;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
void c8263a_clear_numeric_dec(void)
|
||||
{
|
||||
slcd_clear_pixel(C8263A_ICON_MINUS);
|
||||
slcd_clear_pixel(C8263A_ICON_MINUS_SEG1);
|
||||
slcd_clear_pixel(C8263A_ICON_MINUS_SEG2);
|
||||
slcd_character_map_set(SLCD_AUTOMATED_CHAR_START_FROM_BOTTOM_RIGHT,C8263A_DIGITAL_MAP_NUM_SEG-1);
|
||||
for(uint32_t i = 0 ; i < C8263A_MAX_DIGITAL ; i++) {
|
||||
if (i == 0) {
|
||||
slcd_character_write_data(0,C8263A_DIGITAL_SEG_INDEX_S + i*C8263A_DIGITAL_MAP_NUM_SEG,
|
||||
0, C8263A_DIGITAL_MASK);
|
||||
} else {
|
||||
slcd_character_write_data(0,C8263A_DIGITAL_SEG_INDEX_S + i*C8263A_DIGITAL_MAP_NUM_SEG + 2,
|
||||
0, C8263A_DIGITAL_MASK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void c8263a_circular_animation_start(uint8_t size, uint8_t data)
|
||||
{
|
||||
struct slcd_circular_shift_config cfg;
|
||||
slcd_disable();
|
||||
slcd_circular_shift_get_config_defaults(&cfg);
|
||||
cfg.data = data;
|
||||
cfg.size = size;
|
||||
cfg.dir = C8263A_CSR_DIR;
|
||||
cfg.fc = CONF_C8263A_CIRCULAR_ANIMATION_TIMER;
|
||||
slcd_circular_shift_set_config(&cfg);
|
||||
slcd_enable_circular_shift();
|
||||
slcd_enable_frame_counter(CONF_C8263A_CIRCULAR_ANIMATION_TIMER);
|
||||
slcd_enable();
|
||||
}
|
||||
|
||||
void c8263a_circular_animation_stop(void)
|
||||
{
|
||||
slcd_disable_frame_counter(CONF_C8263A_CIRCULAR_ANIMATION_TIMER);
|
||||
slcd_disable_circular_shift();
|
||||
}
|
||||
|
|
@ -1,296 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Management of C8263A LCD Glass component.
|
||||
*
|
||||
* Copyright (c) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef C8263A_H_INCLUDED
|
||||
#define C8263A_H_INCLUDED
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \defgroup c8263a_display_group Atmel YMCC8263AAAFDCL LCD Glass component
|
||||
*
|
||||
* This is a driver for Atmel YMCC8263AAAFDCL LCD component.
|
||||
* This component is the custom LCD used for SAM4L-Xplained-Pro.
|
||||
* This driver provides functions for initialization and control of the
|
||||
* LCD segments.
|
||||
*
|
||||
* \section dependencies Dependencies
|
||||
* This driver depends on the following modules:
|
||||
* - SLCD driver.
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \name Value for battery Icon setting
|
||||
* @{
|
||||
*/
|
||||
enum c8263a_battery_value {
|
||||
C8263A_BATTERY_NONE = 0,
|
||||
C8263A_BATTERY_ONE,
|
||||
C8263A_BATTERY_TWO,
|
||||
C8263A_BATTERY_THREE,
|
||||
};
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name Value for wireless Icon setting
|
||||
* @{
|
||||
*/
|
||||
enum c8263a_wireless_value {
|
||||
C8263A_WIRELESS_NONE = 0,
|
||||
C8263A_WIRELESS_ONE,
|
||||
C8263A_WIRELESS_TWO,
|
||||
C8263A_WIRELESS_THREE,
|
||||
};
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* \name Function Prototypes
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Initialize the C8263A LCD Glass component.
|
||||
*
|
||||
* This function initializes the LCD driver to control the LCD glass.
|
||||
* It perform LCD module intialization according to the C8263A characteristics.
|
||||
*
|
||||
*/
|
||||
void c8263a_init(void);
|
||||
|
||||
/**
|
||||
* \brief Show text on C8263A LCD glass alphanumeric field.
|
||||
*
|
||||
* This function will show text on the alphanumeric field of the LCD glass.
|
||||
*
|
||||
* \param data Pointer to the input string(max length is 8)
|
||||
*/
|
||||
void c8263a_show_text(const uint8_t *data);
|
||||
|
||||
/**
|
||||
* \brief Clear C8263A LCD glass alphanumeric field.
|
||||
*
|
||||
* This function will clear the alphanumeric field of the LCD glass.
|
||||
*/
|
||||
void c8263a_clear_text(void);
|
||||
|
||||
/**
|
||||
* \brief Clear a specific icon on the LCD glass.
|
||||
*
|
||||
* This function will clear a specific icon.
|
||||
*
|
||||
* \param icon_com Pixel coordinate - COMx - of the icon.
|
||||
* \param icon_seg Pixel coordinate - SEGy - of the icon.
|
||||
*
|
||||
* \note Use the icon define in header file.
|
||||
*/
|
||||
void c8263a_clear_icon(uint8_t icon_com, uint8_t icon_seg);
|
||||
|
||||
/**
|
||||
* \brief Show a specific icon on the LCD glass.
|
||||
*
|
||||
* This function will show a specific icon.
|
||||
*
|
||||
* \param icon_com Pixel coordinate - COMx - of the icon.
|
||||
* \param icon_seg Pixel coordinate - SEGy - of the icon.
|
||||
*
|
||||
* \note Use the icon define in header file.
|
||||
*/
|
||||
void c8263a_show_icon(uint8_t icon_com, uint8_t icon_seg);
|
||||
|
||||
/**
|
||||
* \brief Blink a specific icon on the LCD glass.
|
||||
*
|
||||
* This function will blink a specific icon.
|
||||
*
|
||||
* \param icon_com Pixel coordinate - COMx - of the icon.
|
||||
* \param icon_seg Pixel coordinate - SEGy - of the icon.
|
||||
*
|
||||
* \note Use the icon define in header file(with selected segments
|
||||
* blinking feature).
|
||||
*/
|
||||
void c8263a_blink_icon_start(uint8_t icon_com, uint8_t icon_seg);
|
||||
|
||||
/**
|
||||
* \brief Stop blink a specific icon on the LCD glass.
|
||||
*
|
||||
* This function will stop blink a specific icon.
|
||||
*
|
||||
* \param icon_com Pixel coordinate - COMx - of the icon.
|
||||
* \param icon_seg Pixel coordinate - SEGy - of the icon.
|
||||
*
|
||||
* \note Use the icon define in header file(with selected segments
|
||||
* blinking feature).
|
||||
*/
|
||||
void c8263a_blink_icon_stop(uint8_t icon_com, uint8_t icon_seg);
|
||||
|
||||
/**
|
||||
* \brief Blink the current screen content.
|
||||
*
|
||||
* This function will make the current screen blink.
|
||||
*
|
||||
*/
|
||||
void c8263a_blink_screen(void);
|
||||
|
||||
/**
|
||||
* \brief Disable all Blink.
|
||||
*
|
||||
* This function will disable all Blink content.
|
||||
*
|
||||
*/
|
||||
void c8263a_blink_disable(void);
|
||||
|
||||
/**
|
||||
* \brief Set the C8263A LCD glass contrast.
|
||||
*
|
||||
* This function allows to adjust the contrast of the C8263A LCD glass.
|
||||
*
|
||||
* \param contrast Contrast vlaue [0-0xff].
|
||||
*/
|
||||
void c8263a_set_contrast(uint8_t contrast);
|
||||
|
||||
/**
|
||||
* \brief Scrolling start.
|
||||
*
|
||||
* This function start the text scrolling.
|
||||
*
|
||||
* \param data Data string buffer.
|
||||
* \param length Data string length.
|
||||
*/
|
||||
void c8263a_text_scrolling_start(const uint8_t *data, uint32_t length);
|
||||
|
||||
/**
|
||||
* \brief Scrolling stop.
|
||||
*
|
||||
* This function stop the text scrolling.
|
||||
*/
|
||||
void c8263a_text_scrolling_stop(void);
|
||||
|
||||
/**
|
||||
* \brief Show all content of the LCD glass.
|
||||
*
|
||||
* This function sets all pixels and areas of the LCD glass C8263A.
|
||||
*
|
||||
*/
|
||||
void c8263a_show_all(void);
|
||||
|
||||
/**
|
||||
* \brief Clear all content of the LCD glass.
|
||||
*
|
||||
* This function clears all pixels and areas of the LCD glass C8263A.
|
||||
*
|
||||
*/
|
||||
void c8263a_clear_all(void);
|
||||
|
||||
/**
|
||||
* \brief Show a decimal numeric value to LCD glass.
|
||||
*
|
||||
* This function displays an int32 value to the LCD numeric field of the glass.
|
||||
*
|
||||
* \param value The int32_t value to be displayed
|
||||
*
|
||||
* \note The value range is [-199999,199999].
|
||||
*/
|
||||
void c8263a_show_numeric_dec(int32_t value);
|
||||
|
||||
/**
|
||||
* \brief Clear C8263A LCD glass numeric field and the three
|
||||
* C8263A_ICON_MINUS*** icons.
|
||||
*
|
||||
* This function will clear the numeric field of the LCD glass.
|
||||
*/
|
||||
void c8263a_clear_numeric_dec(void);
|
||||
|
||||
/**
|
||||
* \brief Show battery condition by the battery icons on the LCD glass.
|
||||
*
|
||||
* This function allows to Show battery condition by the battery icons
|
||||
* on the LCD glass..
|
||||
*
|
||||
* \param val The 0 to 3 value which show the battery condition.
|
||||
*/
|
||||
void c8263a_show_battery(enum c8263a_battery_value val);
|
||||
|
||||
/**
|
||||
* \brief Show wireless signal condition by the wireless icons on the LCD glass.
|
||||
*
|
||||
* This function allows to Show wireless signal condition by the wireless icons
|
||||
* on the LCD glass..
|
||||
*
|
||||
* \param val The 0 to 3 value which show the wireless signal condition.
|
||||
*/
|
||||
void c8263a_show_wireless(enum c8263a_wireless_value val);
|
||||
|
||||
/**
|
||||
* \brief Start autonomous segment animation.
|
||||
*
|
||||
* \param val The 0 to 3 value which show the wireless signal condition.
|
||||
*
|
||||
* \param size Shift data size.
|
||||
* \param data Shift data.
|
||||
*/
|
||||
|
||||
void c8263a_circular_animation_start(uint8_t size, uint8_t data);
|
||||
|
||||
/**
|
||||
* \brief Stop autonomous segment animation.
|
||||
*
|
||||
*/
|
||||
void c8263a_circular_animation_stop(void);
|
||||
|
||||
/** @} */
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* C8263A_H_INCLUDED */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,58 +0,0 @@
|
|||
|
||||
/**
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
* \mainpage
|
||||
*
|
||||
* \section intro Introduction
|
||||
* This documentation has been automatically generated, and documents the source
|
||||
* code found in the Atmel Software Framework (ASF). <p>
|
||||
* Use the above menu to navigate in the documentation, or use the links below: <br>
|
||||
* <ul>
|
||||
* <li> <a href="globals_func.html">Functions</a>
|
||||
* <li> <a href="annotated.html">Data structures</a>
|
||||
* <li> <a href="globals_type.html">Defines</a>
|
||||
* </ul>
|
||||
*
|
||||
* \section main_licence License
|
||||
* <ul>
|
||||
* <li>\ref License
|
||||
* </ul>
|
||||
* \section contactinfo Contact Information
|
||||
* For further information, visit <a href="http://www.atmel.com/">Atmel</a>.\n
|
||||
*
|
||||
*/
|
|
@ -1,201 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief C8263A LCD Glass component example for SAM.
|
||||
*
|
||||
* Copyright (C) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* \mainpage
|
||||
* \section intro Introduction
|
||||
* This is the documentation for the data structures, functions, variables,
|
||||
* defines, enums, and typedefs for the C8263A LCD Glass component example.
|
||||
* It also comes bundled with an application-example of usage.
|
||||
*
|
||||
* This example demonstrates how to use the C8263A LCD Glass driver.
|
||||
*
|
||||
* The supported board list:
|
||||
* - SAM L22 Xplained Pro B
|
||||
*
|
||||
* \section compilinfo Compilation Information
|
||||
* This software is written for GNU GCC and IAR Embedded Workbench
|
||||
* for Atmel. Other compilers may or may not work.
|
||||
*
|
||||
* \section deviceinfo Device Information
|
||||
* The TSLCD1 Xplained Pro extension board must be connected to SAM devices.
|
||||
*
|
||||
* \section configinfo Configuration Information
|
||||
* - PC terminal settings:
|
||||
* - 38400 bps,
|
||||
* - 8 data bits,
|
||||
* - no parity bit,
|
||||
* - 1 stop bit,
|
||||
* - no flow control.
|
||||
*
|
||||
* \section contactinfo Contact Information
|
||||
* For further information, visit
|
||||
* <A href="http://www.atmel.com">Atmel</A>.\n
|
||||
* Support and FAQ: http://www.atmel.com/design-support/
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#include <asf.h>
|
||||
#include <string.h>
|
||||
#include "config_c8263a.h"
|
||||
struct usart_module usart_instance;
|
||||
|
||||
/**
|
||||
* Configure serial console.
|
||||
*/
|
||||
static void configure_console(void)
|
||||
{
|
||||
struct usart_config config_usart;
|
||||
usart_get_config_defaults(&config_usart);
|
||||
config_usart.baudrate = 38400;
|
||||
config_usart.mux_setting = EDBG_CDC_SERCOM_MUX_SETTING;
|
||||
config_usart.pinmux_pad0 = EDBG_CDC_SERCOM_PINMUX_PAD0;
|
||||
config_usart.pinmux_pad1 = EDBG_CDC_SERCOM_PINMUX_PAD1;
|
||||
config_usart.pinmux_pad2 = EDBG_CDC_SERCOM_PINMUX_PAD2;
|
||||
config_usart.pinmux_pad3 = EDBG_CDC_SERCOM_PINMUX_PAD3;
|
||||
stdio_serial_init(&usart_instance, EDBG_CDC_MODULE, &config_usart);
|
||||
usart_enable(&usart_instance);
|
||||
}
|
||||
|
||||
static void c8263a_icon_test(void)
|
||||
{
|
||||
c8263a_show_icon(C8263A_ICON_COLON);
|
||||
delay_s(1);
|
||||
c8263a_show_battery(C8263A_BATTERY_THREE);
|
||||
delay_s(1);
|
||||
c8263a_show_battery(C8263A_BATTERY_ONE);
|
||||
delay_s(1);
|
||||
c8263a_show_wireless(C8263A_WIRELESS_THREE);
|
||||
delay_s(1);
|
||||
c8263a_show_wireless(C8263A_WIRELESS_TWO);
|
||||
delay_s(1);
|
||||
c8263a_show_icon(C8263A_ICON_ARROW_UP);
|
||||
delay_s(1);
|
||||
c8263a_show_icon(C8263A_ICON_ARROW_DWON);
|
||||
delay_s(1);
|
||||
c8263a_show_icon(C8263A_ICON_ARROW_LEFT);
|
||||
delay_s(1);
|
||||
c8263a_show_icon(C8263A_ICON_ARROW_RIGHT);
|
||||
delay_s(1);
|
||||
c8263a_show_icon(C8263A_ICON_ARROW_CORNER);
|
||||
delay_s(1);
|
||||
c8263a_clear_icon(C8263A_ICON_COLON);
|
||||
}
|
||||
static void c8263a_blink_test(void)
|
||||
{
|
||||
c8263a_blink_icon_start(C8263A_ICON_USB);
|
||||
c8263a_blink_icon_start(C8263A_ICON_ATMEL);
|
||||
delay_s(1);
|
||||
c8263a_blink_icon_stop(C8263A_ICON_USB);
|
||||
}
|
||||
static void c8263a_text_test(void)
|
||||
{
|
||||
c8263a_clear_text();
|
||||
c8263a_show_text((const uint8_t *)"Hi");
|
||||
delay_s(1);
|
||||
c8263a_clear_text();
|
||||
c8263a_show_text((const uint8_t *)"Hello");
|
||||
delay_s(1);
|
||||
c8263a_clear_text();
|
||||
c8263a_show_text((const uint8_t *)"Atmel");
|
||||
}
|
||||
|
||||
static void c8263a_num_dec_test(void)
|
||||
{
|
||||
c8263a_clear_numeric_dec();
|
||||
c8263a_show_numeric_dec(12);
|
||||
delay_s(1);
|
||||
c8263a_clear_numeric_dec();
|
||||
c8263a_show_numeric_dec(345);
|
||||
delay_s(1);
|
||||
c8263a_clear_numeric_dec();
|
||||
c8263a_show_numeric_dec(6789);
|
||||
delay_s(1);
|
||||
c8263a_clear_numeric_dec();
|
||||
c8263a_show_numeric_dec(-98765);
|
||||
delay_s(1);
|
||||
c8263a_clear_numeric_dec();
|
||||
c8263a_show_numeric_dec(-198765);
|
||||
}
|
||||
|
||||
static void c8263a_animation_test(void)
|
||||
{
|
||||
c8263a_circular_animation_start(11,0x0f);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief main function : do init and loop
|
||||
*/
|
||||
int main(void)
|
||||
{
|
||||
system_init();
|
||||
configure_console();
|
||||
delay_init();
|
||||
|
||||
/* Turn on the backlight. */
|
||||
port_pin_set_output_level(SLCD_BACLKLIGHT,true);
|
||||
|
||||
printf("Start SLCD test\r\n");
|
||||
/* Initialize the C8263A LCD glass component. */
|
||||
c8263a_init();
|
||||
|
||||
c8263a_show_all();
|
||||
c8263a_set_contrast(0xc);
|
||||
delay_s(1);
|
||||
c8263a_clear_all();
|
||||
|
||||
c8263a_icon_test();
|
||||
delay_s(1);
|
||||
c8263a_blink_test();
|
||||
delay_s(1);
|
||||
c8263a_text_test();
|
||||
delay_s(1);
|
||||
c8263a_num_dec_test();
|
||||
delay_s(1);
|
||||
c8263a_animation_test();
|
||||
while (1) {
|
||||
}
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM L22 Xplained Pro B board configuration.
|
||||
*
|
||||
* Copyright (c) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef CONF_BOARD_H_INCLUDED
|
||||
#define CONF_BOARD_H_INCLUDED
|
||||
|
||||
#endif /* CONF_BOARD_H_INCLUDED */
|
|
@ -1,171 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM L22 Clock configuration
|
||||
*
|
||||
* Copyright (C) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#include <clock.h>
|
||||
|
||||
#ifndef CONF_CLOCKS_H_INCLUDED
|
||||
# define CONF_CLOCKS_H_INCLUDED
|
||||
|
||||
/* System clock bus configuration */
|
||||
# define CONF_CLOCK_FLASH_WAIT_STATES 0
|
||||
# define CONF_CLOCK_CPU_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_BACKUP_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC16M configuration - Internal 16MHz oscillator */
|
||||
# define CONF_CLOCK_OSC16M_FREQ_SEL SYSTEM_OSC16M_4M
|
||||
# define CONF_CLOCK_OSC16M_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC16M_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC configuration - External clock/oscillator */
|
||||
# define CONF_CLOCK_XOSC_ENABLE false
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY 12000000UL
|
||||
# define CONF_CLOCK_XOSC_STARTUP_TIME SYSTEM_XOSC_STARTUP_32768
|
||||
# define CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL true
|
||||
# define CONF_CLOCK_XOSC_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_XOSC_CLOCK_FAILURE_DETECT false
|
||||
# define CONF_CLOCK_XOSC_CLOCK_FAILURE_DIV SYSTEM_CFD_DIV_128
|
||||
# define CONF_CLOCK_XOSC_CLOCK_FAILURE_EVENT_OUT false
|
||||
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC32K configuration - External 32KHz crystal/clock oscillator */
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE false
|
||||
# define CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC32K_STARTUP_TIME SYSTEM_XOSC32K_STARTUP_65536
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT false
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_XOSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC32K_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_XOSC32K_CLOCK_FAILURE_DETECT false
|
||||
# define CONF_CLOCK_XOSC32K_CLOCK_FAILURE_DIV SYSTEM_CFD_DIV_1
|
||||
# define CONF_CLOCK_XOSC32K_CLOCK_FAILURE_EVENT_OUT false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSCULP32K configuration - Internal Ultra Low Power 32KHz oscillator */
|
||||
# define CONF_CLOCK_OSCULP32K_ENABLE_1KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSCULP32K_ENABLE_32KHZ_OUTPUT true
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DFLL configuration - Digital Frequency Locked Loop */
|
||||
# define CONF_CLOCK_DFLL_ENABLE false
|
||||
# define CONF_CLOCK_DFLL_LOOP_MODE SYSTEM_CLOCK_DFLL_LOOP_MODE_OPEN
|
||||
# define CONF_CLOCK_DFLL_ON_DEMAND false
|
||||
# define CONF_CLOCK_DFLL_RUN_IN_STANDBY false
|
||||
|
||||
/* DFLL open loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_FINE_VALUE (512)
|
||||
|
||||
/* DFLL closed loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
# define CONF_CLOCK_DFLL_MULTIPLY_FACTOR (48000000 / 32768)
|
||||
# define CONF_CLOCK_DFLL_QUICK_LOCK true
|
||||
# define CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK true
|
||||
# define CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP true
|
||||
# define CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE true
|
||||
# define CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE (0x1f / 4)
|
||||
# define CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE (0xff / 4)
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DPLL configuration - Digital Phase-Locked Loop */
|
||||
# define CONF_CLOCK_DPLL_ENABLE false
|
||||
# define CONF_CLOCK_DPLL_ON_DEMAND true
|
||||
# define CONF_CLOCK_DPLL_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_DPLL_LOCK_BYPASS false
|
||||
# define CONF_CLOCK_DPLL_WAKE_UP_FAST false
|
||||
# define CONF_CLOCK_DPLL_LOW_POWER_ENABLE false
|
||||
|
||||
# define CONF_CLOCK_DPLL_LOCK_TIME SYSTEM_CLOCK_SOURCE_DPLL_LOCK_TIME_DEFAULT
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_CLOCK SYSTEM_CLOCK_SOURCE_DPLL_REFERENCE_CLOCK_XOSC32K
|
||||
# define CONF_CLOCK_DPLL_FILTER SYSTEM_CLOCK_SOURCE_DPLL_FILTER_DEFAULT
|
||||
# define CONF_CLOCK_DPLL_PRESCALER SYSTEM_CLOCK_SOURCE_DPLL_DIV_1
|
||||
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_FREQUENCY 32768
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_DIVIDER 1
|
||||
# define CONF_CLOCK_DPLL_OUTPUT_FREQUENCY 48000000
|
||||
|
||||
/* DPLL GCLK reference configuration */
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
/* DPLL GCLK lock timer configuration */
|
||||
# define CONF_CLOCK_DPLL_LOCK_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
|
||||
/* Set this to true to configure the GCLK when running clocks_init. If set to
|
||||
* false, none of the GCLK generators will be configured in clocks_init(). */
|
||||
# define CONF_CLOCK_CONFIGURE_GCLK true
|
||||
|
||||
/* Configure GCLK generator 0 (Main Clock) */
|
||||
# define CONF_CLOCK_GCLK_0_ENABLE true
|
||||
# define CONF_CLOCK_GCLK_0_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_0_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_0_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_0_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 1 */
|
||||
# define CONF_CLOCK_GCLK_1_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_1_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_1_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_XOSC32K
|
||||
# define CONF_CLOCK_GCLK_1_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_1_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 2 */
|
||||
# define CONF_CLOCK_GCLK_2_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_2_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_2_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_2_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_2_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 3 */
|
||||
# define CONF_CLOCK_GCLK_3_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_3_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_3_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 4 */
|
||||
# define CONF_CLOCK_GCLK_4_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_4_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_4_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_4_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_4_OUTPUT_ENABLE false
|
||||
|
||||
#endif /* CONF_CLOCKS_H_INCLUDED */
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM SLCD Driver Configuration Header
|
||||
*
|
||||
* Copyright (C) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#ifndef CONF_SLCD_H_INCLUDED
|
||||
#define CONF_SLCD_H_INCLUDED
|
||||
|
||||
/** Select SLCD clock. Use 32.768KHz OSCULP32K or XOSC32K for SLCD clock.
|
||||
* 0 : From OSCULP32K
|
||||
* 1 : From XOSC32K
|
||||
*/
|
||||
#define CONF_SLCD_CLOCK_SOURCE 0
|
||||
|
||||
/** SLCD Duty Setting
|
||||
* 0:Static duty
|
||||
* 1:1/2 duty
|
||||
* 2:1/3 duty
|
||||
* 3:1/4 duty
|
||||
*/
|
||||
#define CONF_SLCD_DUTY 5
|
||||
|
||||
/**
|
||||
* SLCD Bias Setting.
|
||||
* 0:Static bias
|
||||
* 1:1/2 bias
|
||||
* 2:1/3 bias
|
||||
* 3:1/4 bias
|
||||
*/
|
||||
#define CONF_SLCD_BIAS 3
|
||||
|
||||
/**
|
||||
* SLCD Frame Frequency.
|
||||
* The optimal frame frequency should be in range from 30Hz up to 100Hz
|
||||
* to avoid flickering and ghosting effect.
|
||||
* To get the frame frequency, CLK_SLCD_OSC is first divided by a prescaler
|
||||
* from 16 to 128 then divided by 1 up to 8 as following.
|
||||
*
|
||||
* FrameRate = CLK_SLCD_OSC / (PVAL*(CKDIV+1)(DUTY+1))
|
||||
*
|
||||
* SLCD Prescaler Value (PVAL).
|
||||
* 0 : 16 prescaler
|
||||
* 1 : 32 prescaler
|
||||
* 2 : 64 prescaler
|
||||
* 3 : 128 prescaler
|
||||
*
|
||||
* SLCD Clock divider (CKDIV)
|
||||
* 0 : CKDIV is 0
|
||||
* 1 : CKDIV is 1
|
||||
* 2 : CKDIV is 2
|
||||
* 3 : CKDIV is 3
|
||||
* 4 : CKDIV is 4
|
||||
* 5 : CKDIV is 5
|
||||
* 6 : CKDIV is 6
|
||||
* 7 : CKDIV is 7
|
||||
*/
|
||||
#define CONF_SLCD_PVAL 0
|
||||
#define CONF_SLCD_CKDIV 2
|
||||
|
||||
/** Internal/External VLCD selection.
|
||||
* 0 : Internal VLCD generation
|
||||
* 1 : External VLCD generation
|
||||
*/
|
||||
#define CONF_SLCD_VLCD_SEL 0
|
||||
|
||||
/** Reference refresh frequency.
|
||||
* 0: Bias Reference refresh frequency is 2KHz
|
||||
* 1: Bias Reference refresh frequency is 1KHz
|
||||
* 2: Bias Reference refresh frequency is 500Hz
|
||||
* 3: Bias Reference refresh frequency is 250Hz
|
||||
* 4: Bias Reference refresh frequency is 125Hz
|
||||
* 5: Bias Reference refresh frequency is 62.5Hz
|
||||
*/
|
||||
#define CONF_SLCD_REF_REFRESH_FREQ 0
|
||||
|
||||
/** Power fefresh frequency.
|
||||
* 0: Charge pump refresh frequency is 2KHz
|
||||
* 1: Charge pump refresh frequency is 1KHz
|
||||
* 2: Charge pump refresh frequency is 500Hz
|
||||
* 3: Charge pump refresh frequency is 250Hz
|
||||
*/
|
||||
#define CONF_SLCD_POWER_REFRESH_FREQ 0
|
||||
|
||||
/** LCD Working Power Mode.
|
||||
* 0:LCD power automatically select regualation mode or pump mode.
|
||||
* 1:LCD power use step-up pump loop only.
|
||||
* 2:LCD power use step-down drop-out regulation loop only.
|
||||
*/
|
||||
#define CONF_SLCD_POWER_MODE 0
|
||||
|
||||
/** COM/SEG PIN Selection.
|
||||
* There are 52 LCD pins, but SLCD can drive up to 48 LCD pins which can be
|
||||
* individually enabled or disabled according to the LCD glass. The number of LCD pins
|
||||
* enabled should not be higher than the maximum of COM and SEG lines supported.
|
||||
* COM and SEG lines are always assigned in ascending order.
|
||||
* CONF_SLCD_PIN_L_MASK is pin mask [31,0]
|
||||
* CONF_SLCD_PIN_H_MASK is pin mask [51,32]
|
||||
*/
|
||||
#define CONF_SLCD_PIN_L_MASK 0xCFFFFFC0
|
||||
#define CONF_SLCD_PIN_H_MASK 0x00000FF0
|
||||
#endif
|
|
@ -1,141 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief C8263A configuration.
|
||||
*
|
||||
* Copyright (c) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
/** Configuration of the C8263A LCD glass driver */
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef CONF_C8263A_H_INCLUDED
|
||||
#define CONF_C8263A_H_INCLUDED
|
||||
#include "slcd.h"
|
||||
/**
|
||||
* \name Circular Animation Shift Direction
|
||||
* @{
|
||||
*/
|
||||
#define C8263A_CSR_DIR SLCD_CIRCULAR_SHIFT_LEFT
|
||||
/** @} */
|
||||
|
||||
|
||||
/** Init contrast configuration, it's wthin [0-15]. */
|
||||
#define CONF_C8263A_CONTRAST 0xf
|
||||
|
||||
|
||||
/** Frame count 0 configuration.
|
||||
Prescaler is not bypassed,the overflow value is (CONF_C8263A_FC0+1).
|
||||
*/
|
||||
#define CONF_C8263A_FC0 2
|
||||
/** Frame count 0 configuration.
|
||||
Prescaler is not bypassed,the overflow value is (CONF_C8263A_FC0+1).
|
||||
*/
|
||||
#define CONF_C8263A_FC1 2
|
||||
/** Frame count 0 configuration.
|
||||
Prescaler is not bypassed,the overflow value is (CONF_C8263A_FC0+1).
|
||||
*/
|
||||
#define CONF_C8263A_FC2 1
|
||||
|
||||
/** Blink timer configuration. */
|
||||
#define CONF_C8263A_BLINK_TIMER SLCD_FRAME_COUNTER_0
|
||||
|
||||
/** Circular animation configuration. */
|
||||
#define CONF_C8263A_CIRCULAR_ANIMATION_TIMER SLCD_FRAME_COUNTER_0
|
||||
|
||||
|
||||
#define C8263A_NB_OF_COM 8
|
||||
#define C8263A_NB_OF_SEG 24
|
||||
|
||||
#define C8263A_CHAR_SEG_INDEX_S 8
|
||||
#define C8263A_CHAR_SEG_INDEX_E 23
|
||||
#define C8263A_DIGITAL_SEG_INDEX_S 1
|
||||
#define C8263A_DIGITAL_SEG_INDEX_E 7
|
||||
|
||||
#define C8263A_CHAR_MAP_NUM_SEG 2
|
||||
#define C8263A_CHAR_MASK 0x00ff0003
|
||||
#define C8263A_DIGITAL_MAP_NUM_SEG 1
|
||||
#define C8263A_DIGITAL_MASK 0x00ff8000
|
||||
|
||||
#define C8263A_MAX_CHAR 8
|
||||
#define C8263A_MAX_DIGITAL 5
|
||||
|
||||
/**
|
||||
* \name LCD component C42364A segment map default definitions
|
||||
* @{
|
||||
*/
|
||||
/* Icon with selected segments blinking feature */
|
||||
#define C8263A_ICON_USB 2, 0
|
||||
#define C8263A_ICON_COLON 0, 0
|
||||
#define C8263A_ICON_BAT 4, 2
|
||||
#define C8263A_ICON_ATMEL 1, 0
|
||||
/* Icon without selected segments blinking feature */
|
||||
#define C8263A_ICON_MINUS 0, 17
|
||||
#define C8263A_ICON_MINUS_SEG1 0, 16
|
||||
#define C8263A_ICON_MINUS_SEG2 0, 18
|
||||
#define C8263A_ICON_DOT_1 7, 1
|
||||
#define C8263A_ICON_DOT_2 7, 4
|
||||
#define C8263A_ICON_DOT_3 7, 5
|
||||
#define C8263A_ICON_DOT_4 7, 6
|
||||
#define C8263A_ICON_DOT_5 7, 7
|
||||
#define C8263A_ICON_BAT_LEVEL_1 4, 3
|
||||
#define C8263A_ICON_BAT_LEVEL_2 5, 2
|
||||
#define C8263A_ICON_BAT_LEVEL_3 5, 3
|
||||
#define C8263A_ICON_WLESS_LEVEL_0 0, 2
|
||||
#define C8263A_ICON_WLESS_LEVEL_1 0, 3
|
||||
#define C8263A_ICON_WLESS_LEVEL_2 1, 2
|
||||
#define C8263A_ICON_WLESS_LEVEL_3 1, 3
|
||||
#define C8263A_ICON_ARROW_UP 3, 0
|
||||
#define C8263A_ICON_ARROW_DWON 4, 0
|
||||
#define C8263A_ICON_ARROW_LEFT 5, 0
|
||||
#define C8263A_ICON_ARROW_RIGHT 6, 0
|
||||
#define C8263A_ICON_ARROW_CORNER 7, 0
|
||||
#define C8263A_ICON_AM 0, 21
|
||||
#define C8263A_ICON_PM 0, 20
|
||||
#define C8263A_ICON_DEGREE_C 0, 19
|
||||
#define C8263A_ICON_DEGREE_F 0, 22
|
||||
#define C8263A_ICON_VOLT 0, 15
|
||||
#define C8263A_ICON_CUR 0, 23
|
||||
#define C8263A_ICON_MILLI_VOLT 0, 14
|
||||
#define C8263A_ICON_MICRO_VOLT 0, 13
|
||||
|
||||
/* @} */
|
||||
|
||||
#endif /* CONF_C8263A_H_INCLUDED */
|
File diff suppressed because one or more lines are too long
|
@ -1,52 +0,0 @@
|
|||
# List of available make goals:
|
||||
#
|
||||
# all Default target, builds the project
|
||||
# clean Clean up the project
|
||||
# rebuild Rebuild the project
|
||||
#
|
||||
#
|
||||
# doc Build the documentation
|
||||
# cleandoc Clean up the documentation
|
||||
# rebuilddoc Rebuild the documentation
|
||||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Include the common Makefile, which will also include the project specific
|
||||
# config.mk file.
|
||||
MAKEFILE_PATH = ../../../../../../../sam0/utils/make/Makefile.sam.in
|
||||
include $(MAKEFILE_PATH)
|
|
@ -1,111 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Polled API
|
||||
#include <sercom.h>
|
||||
|
||||
// From module: SERCOM USART - Serial Communications (Polled APIs)
|
||||
#include <usart.h>
|
||||
|
||||
// From module: SLCD - Segment Liquid Crystal Display Controller
|
||||
#include <slcd.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAML22
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver For SAML22
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM L21
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM L21
|
||||
#include <reset.h>
|
||||
|
||||
// From module: Segment LCD
|
||||
#include <c8263a.h>
|
||||
|
||||
// From module: Standard serial I/O (stdio)
|
||||
#include <stdio_serial.h>
|
||||
|
||||
// From module: USART - Serial interface- SAM implementation for devices with only USART
|
||||
#include <serial.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,170 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Path to top level ASF directory relative to this project directory.
|
||||
PRJ_PATH = ../../../../../../..
|
||||
|
||||
# Target CPU architecture: cortex-m3, cortex-m4
|
||||
ARCH = cortex-m0plus
|
||||
|
||||
# Target part: none, sam3n4 or sam4l4aa
|
||||
PART = saml22n18a
|
||||
|
||||
# Application target name. Given with suffix .a for library and .elf for a
|
||||
# standalone application.
|
||||
TARGET_FLASH = c8263a_example_flash.elf
|
||||
TARGET_SRAM = c8263a_example_sram.elf
|
||||
|
||||
# List of C source files.
|
||||
CSRCS = \
|
||||
common/utils/interrupt/interrupt_sam_nvic.c \
|
||||
common2/components/display/c8263a/c8263a.c \
|
||||
common2/components/display/c8263a/example/c8263a_example.c \
|
||||
common2/services/delay/sam0/systick_counter.c \
|
||||
sam0/boards/saml22_xplained_pro_b/board_init.c \
|
||||
sam0/drivers/port/port.c \
|
||||
sam0/drivers/sercom/sercom.c \
|
||||
sam0/drivers/sercom/usart/usart.c \
|
||||
sam0/drivers/slcd/slcd.c \
|
||||
sam0/drivers/system/clock/clock_saml22/clock.c \
|
||||
sam0/drivers/system/clock/clock_saml22/gclk.c \
|
||||
sam0/drivers/system/interrupt/system_interrupt.c \
|
||||
sam0/drivers/system/pinmux/pinmux.c \
|
||||
sam0/drivers/system/system.c \
|
||||
sam0/utils/cmsis/saml22/source/gcc/startup_saml22.c \
|
||||
sam0/utils/cmsis/saml22/source/system_saml22.c \
|
||||
sam0/utils/stdio/read.c \
|
||||
sam0/utils/stdio/write.c \
|
||||
sam0/utils/syscalls/gcc/syscalls.c
|
||||
|
||||
# List of assembler source files.
|
||||
ASSRCS =
|
||||
|
||||
# List of include paths.
|
||||
INC_PATH = \
|
||||
common/boards \
|
||||
common/services/serial \
|
||||
common/utils \
|
||||
common2/components/display/c8263a \
|
||||
common2/components/display/c8263a/example/saml22n18a_saml22_xplained_pro_b \
|
||||
common2/services/delay \
|
||||
common2/services/delay/sam0 \
|
||||
sam0/boards \
|
||||
sam0/boards/saml22_xplained_pro_b \
|
||||
sam0/drivers/port \
|
||||
sam0/drivers/sercom \
|
||||
sam0/drivers/sercom/usart \
|
||||
sam0/drivers/slcd \
|
||||
sam0/drivers/system \
|
||||
sam0/drivers/system/clock \
|
||||
sam0/drivers/system/clock/clock_saml22 \
|
||||
sam0/drivers/system/interrupt \
|
||||
sam0/drivers/system/interrupt/system_interrupt_saml22 \
|
||||
sam0/drivers/system/pinmux \
|
||||
sam0/drivers/system/power \
|
||||
sam0/drivers/system/power/power_sam_l \
|
||||
sam0/drivers/system/reset \
|
||||
sam0/drivers/system/reset/reset_sam_l \
|
||||
sam0/utils \
|
||||
sam0/utils/cmsis/saml22/include \
|
||||
sam0/utils/cmsis/saml22/source \
|
||||
sam0/utils/header_files \
|
||||
sam0/utils/preprocessor \
|
||||
sam0/utils/stdio/stdio_serial \
|
||||
thirdparty/CMSIS/Include \
|
||||
thirdparty/CMSIS/Lib/GCC \
|
||||
common2/components/display/c8263a/example/saml22n18a_saml22_xplained_pro_b/gcc
|
||||
|
||||
# Additional search paths for libraries.
|
||||
LIB_PATH = \
|
||||
thirdparty/CMSIS/Lib/GCC
|
||||
|
||||
# List of libraries to use during linking.
|
||||
LIBS = \
|
||||
arm_cortexM0l_math
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
LINKER_SCRIPT_FLASH = sam0/utils/linker_scripts/saml22/gcc/saml22n18a_flash.ld
|
||||
LINKER_SCRIPT_SRAM = sam0/utils/linker_scripts/saml22/gcc/saml22n18a_sram.ld
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
DEBUG_SCRIPT_FLASH = sam0/boards/saml22_xplained_pro_b/debug_scripts/gcc/saml22_xplained_pro_flash.gdb
|
||||
DEBUG_SCRIPT_SRAM = sam0/boards/saml22_xplained_pro_b/debug_scripts/gcc/saml22_xplained_pro_sram.gdb
|
||||
|
||||
# Project type parameter: all, sram or flash
|
||||
PROJECT_TYPE = flash
|
||||
|
||||
# Additional options for debugging. By default the common Makefile.in will
|
||||
# add -g3.
|
||||
DBGFLAGS =
|
||||
|
||||
# Application optimization used during compilation and linking:
|
||||
# -O0, -O1, -O2, -O3 or -Os
|
||||
OPTIMIZATION = -O1
|
||||
|
||||
# Extra flags to use when archiving.
|
||||
ARFLAGS =
|
||||
|
||||
# Extra flags to use when assembling.
|
||||
ASFLAGS =
|
||||
|
||||
# Extra flags to use when compiling.
|
||||
CFLAGS =
|
||||
|
||||
# Extra flags to use when preprocessing.
|
||||
#
|
||||
# Preprocessor symbol definitions
|
||||
# To add a definition use the format "-D name[=definition]".
|
||||
# To cancel a definition use the format "-U name".
|
||||
#
|
||||
# The most relevant symbols to define for the preprocessor are:
|
||||
# BOARD Target board in use, see boards/board.h for a list.
|
||||
# EXT_BOARD Optional extension board in use, see boards/board.h for a list.
|
||||
CPPFLAGS = \
|
||||
-D ARM_MATH_CM0PLUS=true \
|
||||
-D BOARD=SAML22_XPLAINED_PRO_B \
|
||||
-D SYSTICK_MODE \
|
||||
-D USART_CALLBACK_MODE=false \
|
||||
-D __SAML22N18A__
|
||||
|
||||
# Extra flags to use when linking
|
||||
LDFLAGS = \
|
||||
|
||||
# Pre- and post-build commands
|
||||
PREBUILD_CMD =
|
||||
POSTBUILD_CMD =
|
|
@ -1,111 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Polled API
|
||||
#include <sercom.h>
|
||||
|
||||
// From module: SERCOM USART - Serial Communications (Polled APIs)
|
||||
#include <usart.h>
|
||||
|
||||
// From module: SLCD - Segment Liquid Crystal Display Controller
|
||||
#include <slcd.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAML22
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver For SAML22
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM L21
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM L21
|
||||
#include <reset.h>
|
||||
|
||||
// From module: Segment LCD
|
||||
#include <c8263a.h>
|
||||
|
||||
// From module: Standard serial I/O (stdio)
|
||||
#include <stdio_serial.h>
|
||||
|
||||
// From module: USART - Serial interface- SAM implementation for devices with only USART
|
||||
#include <serial.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,6 +0,0 @@
|
|||
<workspace>
|
||||
<batchBuild></batchBuild>
|
||||
<project>
|
||||
<path>$WS_DIR$\c8263a_example_flash.ewp</path>
|
||||
</project>
|
||||
</workspace>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,141 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief C8263A configuration.
|
||||
*
|
||||
* Copyright (c) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
/** Configuration of the C8263A LCD glass driver */
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef CONF_C8263A_H_INCLUDED
|
||||
#define CONF_C8263A_H_INCLUDED
|
||||
#include "slcd.h"
|
||||
/**
|
||||
* \name Circular Animation Shift Direction
|
||||
* @{
|
||||
*/
|
||||
#define C8263A_CSR_DIR SLCD_CIRCULAR_SHIFT_LEFT
|
||||
/** @} */
|
||||
|
||||
|
||||
/** Init contrast configuration, it's wthin [0-15]. */
|
||||
#define CONF_C8263A_CONTRAST 0xf
|
||||
|
||||
|
||||
/** Frame count 0 configuration.
|
||||
Prescaler is not bypassed,the overflow value is (CONF_C8263A_FC0+1).
|
||||
*/
|
||||
#define CONF_C8263A_FC0 2
|
||||
/** Frame count 0 configuration.
|
||||
Prescaler is not bypassed,the overflow value is (CONF_C8263A_FC0+1).
|
||||
*/
|
||||
#define CONF_C8263A_FC1 2
|
||||
/** Frame count 0 configuration.
|
||||
Prescaler is not bypassed,the overflow value is (CONF_C8263A_FC0+1).
|
||||
*/
|
||||
#define CONF_C8263A_FC2 1
|
||||
|
||||
/** Blink timer configuration. */
|
||||
#define CONF_C8263A_BLINK_TIMER SLCD_FRAME_COUNTER_0
|
||||
|
||||
/** Circular animation configuration. */
|
||||
#define CONF_C8263A_CIRCULAR_ANIMATION_TIMER SLCD_FRAME_COUNTER_0
|
||||
|
||||
|
||||
#define C8263A_NB_OF_COM 8
|
||||
#define C8263A_NB_OF_SEG 24
|
||||
|
||||
#define C8263A_CHAR_SEG_INDEX_S 8
|
||||
#define C8263A_CHAR_SEG_INDEX_E 23
|
||||
#define C8263A_DIGITAL_SEG_INDEX_S 1
|
||||
#define C8263A_DIGITAL_SEG_INDEX_E 7
|
||||
|
||||
#define C8263A_CHAR_MAP_NUM_SEG 2
|
||||
#define C8263A_CHAR_MASK 0x00ff0003
|
||||
#define C8263A_DIGITAL_MAP_NUM_SEG 1
|
||||
#define C8263A_DIGITAL_MASK 0x00ff8000
|
||||
|
||||
#define C8263A_MAX_CHAR 8
|
||||
#define C8263A_MAX_DIGITAL 5
|
||||
|
||||
/**
|
||||
* \name LCD component C42364A segment map default definitions
|
||||
* @{
|
||||
*/
|
||||
/* Icon with selected segments blinking feature */
|
||||
#define C8263A_ICON_USB 2, 0
|
||||
#define C8263A_ICON_COLON 0, 0
|
||||
#define C8263A_ICON_BAT 4, 2
|
||||
#define C8263A_ICON_ATMEL 1, 0
|
||||
/* Icon without selected segments blinking feature */
|
||||
#define C8263A_ICON_MINUS 0, 17
|
||||
#define C8263A_ICON_MINUS_SEG1 0, 16
|
||||
#define C8263A_ICON_MINUS_SEG2 0, 18
|
||||
#define C8263A_ICON_DOT_1 7, 1
|
||||
#define C8263A_ICON_DOT_2 7, 4
|
||||
#define C8263A_ICON_DOT_3 7, 5
|
||||
#define C8263A_ICON_DOT_4 7, 6
|
||||
#define C8263A_ICON_DOT_5 7, 7
|
||||
#define C8263A_ICON_BAT_LEVEL_1 4, 3
|
||||
#define C8263A_ICON_BAT_LEVEL_2 5, 2
|
||||
#define C8263A_ICON_BAT_LEVEL_3 5, 3
|
||||
#define C8263A_ICON_WLESS_LEVEL_0 0, 2
|
||||
#define C8263A_ICON_WLESS_LEVEL_1 0, 3
|
||||
#define C8263A_ICON_WLESS_LEVEL_2 1, 2
|
||||
#define C8263A_ICON_WLESS_LEVEL_3 1, 3
|
||||
#define C8263A_ICON_ARROW_UP 3, 0
|
||||
#define C8263A_ICON_ARROW_DWON 4, 0
|
||||
#define C8263A_ICON_ARROW_LEFT 5, 0
|
||||
#define C8263A_ICON_ARROW_RIGHT 6, 0
|
||||
#define C8263A_ICON_ARROW_CORNER 7, 0
|
||||
#define C8263A_ICON_AM 0, 21
|
||||
#define C8263A_ICON_PM 0, 20
|
||||
#define C8263A_ICON_DEGREE_C 0, 19
|
||||
#define C8263A_ICON_DEGREE_F 0, 22
|
||||
#define C8263A_ICON_VOLT 0, 15
|
||||
#define C8263A_ICON_CUR 0, 23
|
||||
#define C8263A_ICON_MILLI_VOLT 0, 14
|
||||
#define C8263A_ICON_MICRO_VOLT 0, 13
|
||||
|
||||
/* @} */
|
||||
|
||||
#endif /* CONF_C8263A_H_INCLUDED */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,58 +0,0 @@
|
|||
|
||||
/**
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
* \mainpage
|
||||
*
|
||||
* \section intro Introduction
|
||||
* This documentation has been automatically generated, and documents the source
|
||||
* code found in the Atmel Software Framework (ASF). <p>
|
||||
* Use the above menu to navigate in the documentation, or use the links below: <br>
|
||||
* <ul>
|
||||
* <li> <a href="globals_func.html">Functions</a>
|
||||
* <li> <a href="annotated.html">Data structures</a>
|
||||
* <li> <a href="globals_type.html">Defines</a>
|
||||
* </ul>
|
||||
*
|
||||
* \section main_licence License
|
||||
* <ul>
|
||||
* <li>\ref License
|
||||
* </ul>
|
||||
* \section contactinfo Contact Information
|
||||
* For further information, visit <a href="http://www.atmel.com/">Atmel</a>.\n
|
||||
*
|
||||
*/
|
|
@ -1,50 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D11 Xplained Pro board configuration.
|
||||
*
|
||||
* Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef CONF_BOARD_H_INCLUDED
|
||||
#define CONF_BOARD_H_INCLUDED
|
||||
|
||||
#endif /* CONF_BOARD_H_INCLUDED */
|
|
@ -1,177 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D11 Clock configuration
|
||||
*
|
||||
* Copyright (C) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#include <clock.h>
|
||||
|
||||
#ifndef CONF_CLOCKS_H_INCLUDED
|
||||
# define CONF_CLOCKS_H_INCLUDED
|
||||
|
||||
/* System clock bus configuration */
|
||||
# define CONF_CLOCK_CPU_CLOCK_FAILURE_DETECT false
|
||||
# define CONF_CLOCK_FLASH_WAIT_STATES 0
|
||||
# define CONF_CLOCK_CPU_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_APBA_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_APBB_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_APBC_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC8M configuration - Internal 8MHz oscillator */
|
||||
# define CONF_CLOCK_OSC8M_PRESCALER SYSTEM_OSC8M_DIV_1
|
||||
# define CONF_CLOCK_OSC8M_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC8M_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC configuration - External clock/oscillator */
|
||||
# define CONF_CLOCK_XOSC_ENABLE false
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY 12000000UL
|
||||
# define CONF_CLOCK_XOSC_STARTUP_TIME SYSTEM_XOSC_STARTUP_32768
|
||||
# define CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL true
|
||||
# define CONF_CLOCK_XOSC_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC32K configuration - External 32KHz crystal/clock oscillator */
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE false
|
||||
# define CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC32K_STARTUP_TIME SYSTEM_XOSC32K_STARTUP_65536
|
||||
# define CONF_CLOCK_XOSC32K_AUTO_AMPLITUDE_CONTROL false
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT false
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_XOSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC32K_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC32K configuration - Internal 32KHz oscillator */
|
||||
# define CONF_CLOCK_OSC32K_ENABLE false
|
||||
# define CONF_CLOCK_OSC32K_STARTUP_TIME SYSTEM_OSC32K_STARTUP_130
|
||||
# define CONF_CLOCK_OSC32K_ENABLE_1KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC32K_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DFLL configuration - Digital Frequency Locked Loop */
|
||||
# define CONF_CLOCK_DFLL_ENABLE false
|
||||
# define CONF_CLOCK_DFLL_LOOP_MODE SYSTEM_CLOCK_DFLL_LOOP_MODE_OPEN
|
||||
# define CONF_CLOCK_DFLL_ON_DEMAND false
|
||||
|
||||
/* DFLL open loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_FINE_VALUE (512)
|
||||
|
||||
/* DFLL closed loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
# define CONF_CLOCK_DFLL_MULTIPLY_FACTOR 6
|
||||
# define CONF_CLOCK_DFLL_QUICK_LOCK true
|
||||
# define CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK true
|
||||
# define CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP true
|
||||
# define CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE true
|
||||
# define CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE (0x1f / 4)
|
||||
# define CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE (0xff / 4)
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DPLL configuration - Digital Phase-Locked Loop */
|
||||
# define CONF_CLOCK_DPLL_ENABLE false
|
||||
# define CONF_CLOCK_DPLL_ON_DEMAND true
|
||||
# define CONF_CLOCK_DPLL_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_DPLL_LOCK_BYPASS false
|
||||
# define CONF_CLOCK_DPLL_WAKE_UP_FAST false
|
||||
# define CONF_CLOCK_DPLL_LOW_POWER_ENABLE false
|
||||
|
||||
# define CONF_CLOCK_DPLL_LOCK_TIME SYSTEM_CLOCK_SOURCE_DPLL_LOCK_TIME_DEFAULT
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_CLOCK SYSTEM_CLOCK_SOURCE_DPLL_REFERENCE_CLOCK_XOSC32K
|
||||
# define CONF_CLOCK_DPLL_FILTER SYSTEM_CLOCK_SOURCE_DPLL_FILTER_DEFAULT
|
||||
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_FREQUENCY 32768
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_DIVIDER 1
|
||||
# define CONF_CLOCK_DPLL_OUTPUT_FREQUENCY 48000000
|
||||
|
||||
/* DPLL GCLK reference configuration */
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
/* DPLL GCLK lock timer configuration */
|
||||
# define CONF_CLOCK_DPLL_LOCK_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
|
||||
/* Set this to true to configure the GCLK when running clocks_init. If set to
|
||||
* false, none of the GCLK generators will be configured in clocks_init(). */
|
||||
# define CONF_CLOCK_CONFIGURE_GCLK true
|
||||
|
||||
/* Configure GCLK generator 0 (Main Clock) */
|
||||
# define CONF_CLOCK_GCLK_0_ENABLE true
|
||||
# define CONF_CLOCK_GCLK_0_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_0_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_0_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_0_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 1 */
|
||||
# define CONF_CLOCK_GCLK_1_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_1_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_1_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_1_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_1_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 2 (RTC) */
|
||||
# define CONF_CLOCK_GCLK_2_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_2_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_2_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC32K
|
||||
# define CONF_CLOCK_GCLK_2_PRESCALER 32
|
||||
# define CONF_CLOCK_GCLK_2_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 3 */
|
||||
# define CONF_CLOCK_GCLK_3_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_3_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_3_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 4 */
|
||||
# define CONF_CLOCK_GCLK_4_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_4_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_4_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_4_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_4_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 5 */
|
||||
# define CONF_CLOCK_GCLK_5_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_5_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_5_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_5_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_5_OUTPUT_ENABLE false
|
||||
|
||||
#endif /* CONF_CLOCKS_H_INCLUDED */
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D11 SPI configuration
|
||||
*
|
||||
* Copyright (C) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CONF_SPI_H_INCLUDED
|
||||
# define CONF_SPI_H_INCLUDED
|
||||
|
||||
# define CONF_SPI_MASTER_ENABLE true
|
||||
# define CONF_SPI_SLAVE_ENABLE false
|
||||
|
||||
#endif /* CONF_SPI_H_INCLUDED */
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SSD1306 display controller driver configuration file.
|
||||
*
|
||||
* Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#ifndef CONF_SSD1306_H_INCLUDED
|
||||
#define CONF_SSD1306_H_INCLUDED
|
||||
|
||||
#include <board.h>
|
||||
|
||||
// Interface configuration for SAM D11 Xplained Pro
|
||||
# define SSD1306_SPI EXT1_SPI_MODULE
|
||||
# define CONFIG_SSD1306_FRAMEBUFFER
|
||||
|
||||
# define SSD1306_DC_PIN EXT1_PIN_5
|
||||
# define SSD1306_RES_PIN EXT1_PIN_10
|
||||
# define SSD1306_CS_PIN EXT1_PIN_15
|
||||
|
||||
# define SSD1306_SPI_PINMUX_SETTING EXT1_SPI_SERCOM_MUX_SETTING
|
||||
# define SSD1306_SPI_PINMUX_PAD0 EXT1_SPI_SERCOM_PINMUX_PAD0
|
||||
# define SSD1306_SPI_PINMUX_PAD1 EXT1_SPI_SERCOM_PINMUX_PAD1
|
||||
# define SSD1306_SPI_PINMUX_PAD2 PINMUX_UNUSED
|
||||
# define SSD1306_SPI_PINMUX_PAD3 EXT1_SPI_SERCOM_PINMUX_PAD3
|
||||
|
||||
// Minimum clock period is 50ns@3.3V -> max frequency is 20MHz
|
||||
#define SSD1306_CLOCK_SPEED 1000000UL
|
||||
#define SSD1306_DISPLAY_CONTRAST_MAX 40
|
||||
#define SSD1306_DISPLAY_CONTRAST_MIN 30
|
||||
|
||||
#endif /* CONF_SSD1306_H_INCLUDED */
|
File diff suppressed because one or more lines are too long
|
@ -1,52 +0,0 @@
|
|||
# List of available make goals:
|
||||
#
|
||||
# all Default target, builds the project
|
||||
# clean Clean up the project
|
||||
# rebuild Rebuild the project
|
||||
#
|
||||
#
|
||||
# doc Build the documentation
|
||||
# cleandoc Clean up the documentation
|
||||
# rebuilddoc Rebuild the documentation
|
||||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Include the common Makefile, which will also include the project specific
|
||||
# config.mk file.
|
||||
MAKEFILE_PATH = ../../../../../../../sam0/utils/make/Makefile.sam.in
|
||||
include $(MAKEFILE_PATH)
|
|
@ -1,104 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Callback API
|
||||
#include <sercom.h>
|
||||
#include <sercom_interrupt.h>
|
||||
|
||||
// From module: SERCOM SPI - Serial Peripheral Interface (Callback APIs)
|
||||
#include <spi.h>
|
||||
#include <spi_interrupt.h>
|
||||
|
||||
// From module: SSD1306 OLED controller
|
||||
#include <ssd1306.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAMD11
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM D20/D21/R21/D09/D10/D11/DA/HA
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM D20/D21/R21/D09/D10/D11/DA/HA
|
||||
#include <reset.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,166 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Path to top level ASF directory relative to this project directory.
|
||||
PRJ_PATH = ../../../../../../..
|
||||
|
||||
# Target CPU architecture: cortex-m3, cortex-m4
|
||||
ARCH = cortex-m0plus
|
||||
|
||||
# Target part: none, sam3n4 or sam4l4aa
|
||||
PART = samd11d14am
|
||||
|
||||
# Application target name. Given with suffix .a for library and .elf for a
|
||||
# standalone application.
|
||||
TARGET_FLASH = ssd1306_example_flash.elf
|
||||
TARGET_SRAM = ssd1306_example_sram.elf
|
||||
|
||||
# List of C source files.
|
||||
CSRCS = \
|
||||
common/utils/interrupt/interrupt_sam_nvic.c \
|
||||
common2/components/display/ssd1306/example/ssd1306_example.c \
|
||||
common2/components/display/ssd1306/ssd1306.c \
|
||||
common2/services/delay/sam0/systick_counter.c \
|
||||
sam0/boards/samd11_xplained_pro/board_init.c \
|
||||
sam0/drivers/port/port.c \
|
||||
sam0/drivers/sercom/sercom.c \
|
||||
sam0/drivers/sercom/sercom_interrupt.c \
|
||||
sam0/drivers/sercom/spi/spi.c \
|
||||
sam0/drivers/sercom/spi/spi_interrupt.c \
|
||||
sam0/drivers/system/clock/clock_samd09_d10_d11/clock.c \
|
||||
sam0/drivers/system/clock/clock_samd09_d10_d11/gclk.c \
|
||||
sam0/drivers/system/interrupt/system_interrupt.c \
|
||||
sam0/drivers/system/pinmux/pinmux.c \
|
||||
sam0/drivers/system/system.c \
|
||||
sam0/utils/cmsis/samd11/source/gcc/startup_samd11.c \
|
||||
sam0/utils/cmsis/samd11/source/system_samd11.c \
|
||||
sam0/utils/syscalls/gcc/syscalls.c
|
||||
|
||||
# List of assembler source files.
|
||||
ASSRCS =
|
||||
|
||||
# List of include paths.
|
||||
INC_PATH = \
|
||||
common/boards \
|
||||
common/utils \
|
||||
common2/components/display/ssd1306 \
|
||||
common2/components/display/ssd1306/example/samd11_xplained_pro \
|
||||
common2/services/delay \
|
||||
common2/services/delay/sam0 \
|
||||
sam0/boards \
|
||||
sam0/boards/samd11_xplained_pro \
|
||||
sam0/drivers/port \
|
||||
sam0/drivers/sercom \
|
||||
sam0/drivers/sercom/spi \
|
||||
sam0/drivers/system \
|
||||
sam0/drivers/system/clock \
|
||||
sam0/drivers/system/clock/clock_samd09_d10_d11 \
|
||||
sam0/drivers/system/interrupt \
|
||||
sam0/drivers/system/interrupt/system_interrupt_samd10_d11 \
|
||||
sam0/drivers/system/pinmux \
|
||||
sam0/drivers/system/power \
|
||||
sam0/drivers/system/power/power_sam_d_r_h \
|
||||
sam0/drivers/system/reset \
|
||||
sam0/drivers/system/reset/reset_sam_d_r_h \
|
||||
sam0/utils \
|
||||
sam0/utils/cmsis/samd11/include \
|
||||
sam0/utils/cmsis/samd11/source \
|
||||
sam0/utils/header_files \
|
||||
sam0/utils/preprocessor \
|
||||
thirdparty/CMSIS/Include \
|
||||
thirdparty/CMSIS/Lib/GCC \
|
||||
common2/components/display/ssd1306/example/samd11_xplained_pro/gcc
|
||||
|
||||
# Additional search paths for libraries.
|
||||
LIB_PATH = \
|
||||
thirdparty/CMSIS/Lib/GCC
|
||||
|
||||
# List of libraries to use during linking.
|
||||
LIBS = \
|
||||
arm_cortexM0l_math
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
LINKER_SCRIPT_FLASH = sam0/utils/linker_scripts/samd11/gcc/samd11d14am_flash.ld
|
||||
LINKER_SCRIPT_SRAM = sam0/utils/linker_scripts/samd11/gcc/samd11d14am_sram.ld
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
DEBUG_SCRIPT_FLASH = sam0/boards/samd11_xplained_pro/debug_scripts/gcc/samd11_xplained_pro_flash.gdb
|
||||
DEBUG_SCRIPT_SRAM = sam0/boards/samd11_xplained_pro/debug_scripts/gcc/samd11_xplained_pro_sram.gdb
|
||||
|
||||
# Project type parameter: all, sram or flash
|
||||
PROJECT_TYPE = flash
|
||||
|
||||
# Additional options for debugging. By default the common Makefile.in will
|
||||
# add -g3.
|
||||
DBGFLAGS =
|
||||
|
||||
# Application optimization used during compilation and linking:
|
||||
# -O0, -O1, -O2, -O3 or -Os
|
||||
OPTIMIZATION = -O1
|
||||
|
||||
# Extra flags to use when archiving.
|
||||
ARFLAGS =
|
||||
|
||||
# Extra flags to use when assembling.
|
||||
ASFLAGS =
|
||||
|
||||
# Extra flags to use when compiling.
|
||||
CFLAGS =
|
||||
|
||||
# Extra flags to use when preprocessing.
|
||||
#
|
||||
# Preprocessor symbol definitions
|
||||
# To add a definition use the format "-D name[=definition]".
|
||||
# To cancel a definition use the format "-U name".
|
||||
#
|
||||
# The most relevant symbols to define for the preprocessor are:
|
||||
# BOARD Target board in use, see boards/board.h for a list.
|
||||
# EXT_BOARD Optional extension board in use, see boards/board.h for a list.
|
||||
CPPFLAGS = \
|
||||
-D ARM_MATH_CM0PLUS=true \
|
||||
-D BOARD=SAMD11_XPLAINED_PRO \
|
||||
-D SPI_CALLBACK_MODE=true \
|
||||
-D SYSTICK_MODE \
|
||||
-D __SAMD11D14AM__
|
||||
|
||||
# Extra flags to use when linking
|
||||
LDFLAGS = \
|
||||
|
||||
# Pre- and post-build commands
|
||||
PREBUILD_CMD =
|
||||
POSTBUILD_CMD =
|
|
@ -1,104 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Callback API
|
||||
#include <sercom.h>
|
||||
#include <sercom_interrupt.h>
|
||||
|
||||
// From module: SERCOM SPI - Serial Peripheral Interface (Callback APIs)
|
||||
#include <spi.h>
|
||||
#include <spi_interrupt.h>
|
||||
|
||||
// From module: SSD1306 OLED controller
|
||||
#include <ssd1306.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAMD11
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM D20/D21/R21/D09/D10/D11/DA/HA
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM D20/D21/R21/D09/D10/D11/DA/HA
|
||||
#include <reset.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,6 +0,0 @@
|
|||
<workspace>
|
||||
<batchBuild></batchBuild>
|
||||
<project>
|
||||
<path>$WS_DIR$\ssd1306_example_flash.ewp</path>
|
||||
</project>
|
||||
</workspace>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,52 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Board configuration for the ST7565R example
|
||||
*
|
||||
* Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#ifndef CONF_BOARD_H_INCLUDED
|
||||
#define CONF_BOARD_H_INCLUDED
|
||||
|
||||
// Enable the OLED screen
|
||||
#define CONF_BOARD_OLED_UG_2832HSWEG04
|
||||
|
||||
#endif /* CONF_BOARD_H_INCLUDED */
|
|
@ -1,172 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 Clock configuration
|
||||
*
|
||||
* Copyright (C) 2012-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#include <clock.h>
|
||||
|
||||
#ifndef CONF_CLOCKS_H_INCLUDED
|
||||
# define CONF_CLOCKS_H_INCLUDED
|
||||
|
||||
/* System clock bus configuration */
|
||||
# define CONF_CLOCK_CPU_CLOCK_FAILURE_DETECT false
|
||||
# define CONF_CLOCK_FLASH_WAIT_STATES 0
|
||||
# define CONF_CLOCK_CPU_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_APBA_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_APBB_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_APBC_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC8M configuration - Internal 8MHz oscillator */
|
||||
# define CONF_CLOCK_OSC8M_PRESCALER SYSTEM_OSC8M_DIV_1
|
||||
# define CONF_CLOCK_OSC8M_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC8M_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC configuration - External clock/oscillator */
|
||||
# define CONF_CLOCK_XOSC_ENABLE false
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY 12000000UL
|
||||
# define CONF_CLOCK_XOSC_STARTUP_TIME SYSTEM_XOSC_STARTUP_32768
|
||||
# define CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL true
|
||||
# define CONF_CLOCK_XOSC_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC32K configuration - External 32KHz crystal/clock oscillator */
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE false
|
||||
# define CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC32K_STARTUP_TIME SYSTEM_XOSC32K_STARTUP_65536
|
||||
# define CONF_CLOCK_XOSC32K_AUTO_AMPLITUDE_CONTROL false
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT false
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_XOSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC32K_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC32K configuration - Internal 32KHz oscillator */
|
||||
# define CONF_CLOCK_OSC32K_ENABLE false
|
||||
# define CONF_CLOCK_OSC32K_STARTUP_TIME SYSTEM_OSC32K_STARTUP_130
|
||||
# define CONF_CLOCK_OSC32K_ENABLE_1KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC32K_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DFLL configuration - Digital Frequency Locked Loop */
|
||||
# define CONF_CLOCK_DFLL_ENABLE false
|
||||
# define CONF_CLOCK_DFLL_LOOP_MODE SYSTEM_CLOCK_DFLL_LOOP_MODE_OPEN
|
||||
# define CONF_CLOCK_DFLL_ON_DEMAND false
|
||||
|
||||
/* DFLL open loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_FINE_VALUE (512)
|
||||
|
||||
/* DFLL closed loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
# define CONF_CLOCK_DFLL_MULTIPLY_FACTOR 6
|
||||
# define CONF_CLOCK_DFLL_QUICK_LOCK true
|
||||
# define CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK true
|
||||
# define CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP true
|
||||
# define CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE true
|
||||
# define CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE (0x1f / 4)
|
||||
# define CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE (0xff / 4)
|
||||
|
||||
|
||||
/* Set this to true to configure the GCLK when running clocks_init. If set to
|
||||
* false, none of the GCLK generators will be configured in clocks_init(). */
|
||||
# define CONF_CLOCK_CONFIGURE_GCLK true
|
||||
|
||||
/* Configure GCLK generator 0 (Main Clock) */
|
||||
# define CONF_CLOCK_GCLK_0_ENABLE true
|
||||
# define CONF_CLOCK_GCLK_0_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_0_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_0_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_0_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 1 */
|
||||
# define CONF_CLOCK_GCLK_1_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_1_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_1_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_1_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_1_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 2 (RTC) */
|
||||
# define CONF_CLOCK_GCLK_2_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_2_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_2_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC32K
|
||||
# define CONF_CLOCK_GCLK_2_PRESCALER 32
|
||||
# define CONF_CLOCK_GCLK_2_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 3 */
|
||||
# define CONF_CLOCK_GCLK_3_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_3_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_3_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 4 */
|
||||
# define CONF_CLOCK_GCLK_4_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_4_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_4_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_4_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_4_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 5 */
|
||||
# define CONF_CLOCK_GCLK_5_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_5_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_5_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_5_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_5_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 6 */
|
||||
# define CONF_CLOCK_GCLK_6_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_6_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_6_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_6_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_6_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 7 */
|
||||
# define CONF_CLOCK_GCLK_7_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_7_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_7_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_7_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_7_OUTPUT_ENABLE false
|
||||
|
||||
#endif /* CONF_CLOCKS_H_INCLUDED */
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D20 SPI configuration
|
||||
*
|
||||
* Copyright (C) 2013-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CONF_SPI_H_INCLUDED
|
||||
# define CONF_SPI_H_INCLUDED
|
||||
|
||||
# define CONF_SPI_MASTER_ENABLE true
|
||||
# define CONF_SPI_SLAVE_ENABLE false
|
||||
|
||||
#endif /* CONF_SPI_H_INCLUDED */
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SSD1306 display controller driver configuration file.
|
||||
*
|
||||
* Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#ifndef CONF_SSD1306_H_INCLUDED
|
||||
#define CONF_SSD1306_H_INCLUDED
|
||||
|
||||
#include <board.h>
|
||||
|
||||
// Interface configuration for SAM D20 Xplained Pro
|
||||
# define SSD1306_SPI EXT3_SPI_MODULE
|
||||
# define CONFIG_SSD1306_FRAMEBUFFER
|
||||
|
||||
# define SSD1306_DC_PIN EXT3_PIN_5
|
||||
# define SSD1306_RES_PIN EXT3_PIN_10
|
||||
# define SSD1306_CS_PIN EXT3_PIN_15
|
||||
|
||||
# define SSD1306_SPI_PINMUX_SETTING EXT3_SPI_SERCOM_MUX_SETTING
|
||||
# define SSD1306_SPI_PINMUX_PAD0 EXT3_SPI_SERCOM_PINMUX_PAD0
|
||||
# define SSD1306_SPI_PINMUX_PAD1 PINMUX_UNUSED
|
||||
# define SSD1306_SPI_PINMUX_PAD2 EXT3_SPI_SERCOM_PINMUX_PAD2
|
||||
# define SSD1306_SPI_PINMUX_PAD3 EXT3_SPI_SERCOM_PINMUX_PAD3
|
||||
|
||||
// Minimum clock period is 50ns@3.3V -> max frequency is 20MHz
|
||||
#define SSD1306_CLOCK_SPEED 1000000UL
|
||||
#define SSD1306_DISPLAY_CONTRAST_MAX 40
|
||||
#define SSD1306_DISPLAY_CONTRAST_MIN 30
|
||||
|
||||
#endif /* CONF_SSD1306_H_INCLUDED */
|
File diff suppressed because one or more lines are too long
|
@ -1,52 +0,0 @@
|
|||
# List of available make goals:
|
||||
#
|
||||
# all Default target, builds the project
|
||||
# clean Clean up the project
|
||||
# rebuild Rebuild the project
|
||||
#
|
||||
#
|
||||
# doc Build the documentation
|
||||
# cleandoc Clean up the documentation
|
||||
# rebuilddoc Rebuild the documentation
|
||||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Include the common Makefile, which will also include the project specific
|
||||
# config.mk file.
|
||||
MAKEFILE_PATH = ../../../../../../../sam0/utils/make/Makefile.sam.in
|
||||
include $(MAKEFILE_PATH)
|
|
@ -1,104 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Callback API
|
||||
#include <sercom.h>
|
||||
#include <sercom_interrupt.h>
|
||||
|
||||
// From module: SERCOM SPI - Serial Peripheral Interface (Callback APIs)
|
||||
#include <spi.h>
|
||||
#include <spi_interrupt.h>
|
||||
|
||||
// From module: SSD1306 OLED controller
|
||||
#include <ssd1306.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAMD20
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM D20/D21/R21/D09/D10/D11/DA/HA
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM D20/D21/R21/D09/D10/D11/DA/HA
|
||||
#include <reset.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,166 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Path to top level ASF directory relative to this project directory.
|
||||
PRJ_PATH = ../../../../../../..
|
||||
|
||||
# Target CPU architecture: cortex-m3, cortex-m4
|
||||
ARCH = cortex-m0plus
|
||||
|
||||
# Target part: none, sam3n4 or sam4l4aa
|
||||
PART = samd20j18
|
||||
|
||||
# Application target name. Given with suffix .a for library and .elf for a
|
||||
# standalone application.
|
||||
TARGET_FLASH = ssd1306_example_flash.elf
|
||||
TARGET_SRAM = ssd1306_example_sram.elf
|
||||
|
||||
# List of C source files.
|
||||
CSRCS = \
|
||||
common/utils/interrupt/interrupt_sam_nvic.c \
|
||||
common2/components/display/ssd1306/example/ssd1306_example.c \
|
||||
common2/components/display/ssd1306/ssd1306.c \
|
||||
common2/services/delay/sam0/systick_counter.c \
|
||||
sam0/boards/samd20_xplained_pro/board_init.c \
|
||||
sam0/drivers/port/port.c \
|
||||
sam0/drivers/sercom/sercom.c \
|
||||
sam0/drivers/sercom/sercom_interrupt.c \
|
||||
sam0/drivers/sercom/spi/spi.c \
|
||||
sam0/drivers/sercom/spi/spi_interrupt.c \
|
||||
sam0/drivers/system/clock/clock_samd20/clock.c \
|
||||
sam0/drivers/system/clock/clock_samd20/gclk.c \
|
||||
sam0/drivers/system/interrupt/system_interrupt.c \
|
||||
sam0/drivers/system/pinmux/pinmux.c \
|
||||
sam0/drivers/system/system.c \
|
||||
sam0/utils/cmsis/samd20/source/gcc/startup_samd20.c \
|
||||
sam0/utils/cmsis/samd20/source/system_samd20.c \
|
||||
sam0/utils/syscalls/gcc/syscalls.c
|
||||
|
||||
# List of assembler source files.
|
||||
ASSRCS =
|
||||
|
||||
# List of include paths.
|
||||
INC_PATH = \
|
||||
common/boards \
|
||||
common/utils \
|
||||
common2/components/display/ssd1306 \
|
||||
common2/components/display/ssd1306/example/samd20_xplained_pro \
|
||||
common2/services/delay \
|
||||
common2/services/delay/sam0 \
|
||||
sam0/boards \
|
||||
sam0/boards/samd20_xplained_pro \
|
||||
sam0/drivers/port \
|
||||
sam0/drivers/sercom \
|
||||
sam0/drivers/sercom/spi \
|
||||
sam0/drivers/system \
|
||||
sam0/drivers/system/clock \
|
||||
sam0/drivers/system/clock/clock_samd20 \
|
||||
sam0/drivers/system/interrupt \
|
||||
sam0/drivers/system/interrupt/system_interrupt_samd20 \
|
||||
sam0/drivers/system/pinmux \
|
||||
sam0/drivers/system/power \
|
||||
sam0/drivers/system/power/power_sam_d_r_h \
|
||||
sam0/drivers/system/reset \
|
||||
sam0/drivers/system/reset/reset_sam_d_r_h \
|
||||
sam0/utils \
|
||||
sam0/utils/cmsis/samd20/include \
|
||||
sam0/utils/cmsis/samd20/source \
|
||||
sam0/utils/header_files \
|
||||
sam0/utils/preprocessor \
|
||||
thirdparty/CMSIS/Include \
|
||||
thirdparty/CMSIS/Lib/GCC \
|
||||
common2/components/display/ssd1306/example/samd20_xplained_pro/gcc
|
||||
|
||||
# Additional search paths for libraries.
|
||||
LIB_PATH = \
|
||||
thirdparty/CMSIS/Lib/GCC
|
||||
|
||||
# List of libraries to use during linking.
|
||||
LIBS = \
|
||||
arm_cortexM0l_math
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
LINKER_SCRIPT_FLASH = sam0/utils/linker_scripts/samd20/gcc/samd20j18_flash.ld
|
||||
LINKER_SCRIPT_SRAM = sam0/utils/linker_scripts/samd20/gcc/samd20j18_sram.ld
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
DEBUG_SCRIPT_FLASH = sam0/boards/samd20_xplained_pro/debug_scripts/gcc/samd20_xplained_pro_flash.gdb
|
||||
DEBUG_SCRIPT_SRAM = sam0/boards/samd20_xplained_pro/debug_scripts/gcc/samd20_xplained_pro_sram.gdb
|
||||
|
||||
# Project type parameter: all, sram or flash
|
||||
PROJECT_TYPE = flash
|
||||
|
||||
# Additional options for debugging. By default the common Makefile.in will
|
||||
# add -g3.
|
||||
DBGFLAGS =
|
||||
|
||||
# Application optimization used during compilation and linking:
|
||||
# -O0, -O1, -O2, -O3 or -Os
|
||||
OPTIMIZATION = -O1
|
||||
|
||||
# Extra flags to use when archiving.
|
||||
ARFLAGS =
|
||||
|
||||
# Extra flags to use when assembling.
|
||||
ASFLAGS =
|
||||
|
||||
# Extra flags to use when compiling.
|
||||
CFLAGS =
|
||||
|
||||
# Extra flags to use when preprocessing.
|
||||
#
|
||||
# Preprocessor symbol definitions
|
||||
# To add a definition use the format "-D name[=definition]".
|
||||
# To cancel a definition use the format "-U name".
|
||||
#
|
||||
# The most relevant symbols to define for the preprocessor are:
|
||||
# BOARD Target board in use, see boards/board.h for a list.
|
||||
# EXT_BOARD Optional extension board in use, see boards/board.h for a list.
|
||||
CPPFLAGS = \
|
||||
-D ARM_MATH_CM0PLUS=true \
|
||||
-D BOARD=SAMD20_XPLAINED_PRO \
|
||||
-D SPI_CALLBACK_MODE=true \
|
||||
-D SYSTICK_MODE \
|
||||
-D __SAMD20J18__
|
||||
|
||||
# Extra flags to use when linking
|
||||
LDFLAGS = \
|
||||
|
||||
# Pre- and post-build commands
|
||||
PREBUILD_CMD =
|
||||
POSTBUILD_CMD =
|
|
@ -1,104 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Callback API
|
||||
#include <sercom.h>
|
||||
#include <sercom_interrupt.h>
|
||||
|
||||
// From module: SERCOM SPI - Serial Peripheral Interface (Callback APIs)
|
||||
#include <spi.h>
|
||||
#include <spi_interrupt.h>
|
||||
|
||||
// From module: SSD1306 OLED controller
|
||||
#include <ssd1306.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAMD20
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM D20/D21/R21/D09/D10/D11/DA/HA
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM D20/D21/R21/D09/D10/D11/DA/HA
|
||||
#include <reset.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,6 +0,0 @@
|
|||
<workspace>
|
||||
<batchBuild></batchBuild>
|
||||
<project>
|
||||
<path>$WS_DIR$\ssd1306_example_flash.ewp</path>
|
||||
</project>
|
||||
</workspace>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,50 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D21 Xplained Pro board configuration.
|
||||
*
|
||||
* Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef CONF_BOARD_H_INCLUDED
|
||||
#define CONF_BOARD_H_INCLUDED
|
||||
|
||||
#endif /* CONF_BOARD_H_INCLUDED */
|
|
@ -1,197 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D21 Clock configuration
|
||||
*
|
||||
* Copyright (C) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#include <clock.h>
|
||||
|
||||
#ifndef CONF_CLOCKS_H_INCLUDED
|
||||
# define CONF_CLOCKS_H_INCLUDED
|
||||
|
||||
/* System clock bus configuration */
|
||||
# define CONF_CLOCK_CPU_CLOCK_FAILURE_DETECT false
|
||||
# define CONF_CLOCK_FLASH_WAIT_STATES 0
|
||||
# define CONF_CLOCK_CPU_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_APBA_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_APBB_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_APBC_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC8M configuration - Internal 8MHz oscillator */
|
||||
# define CONF_CLOCK_OSC8M_PRESCALER SYSTEM_OSC8M_DIV_1
|
||||
# define CONF_CLOCK_OSC8M_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC8M_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC configuration - External clock/oscillator */
|
||||
# define CONF_CLOCK_XOSC_ENABLE false
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY 12000000UL
|
||||
# define CONF_CLOCK_XOSC_STARTUP_TIME SYSTEM_XOSC_STARTUP_32768
|
||||
# define CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL true
|
||||
# define CONF_CLOCK_XOSC_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC32K configuration - External 32KHz crystal/clock oscillator */
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE false
|
||||
# define CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC32K_STARTUP_TIME SYSTEM_XOSC32K_STARTUP_65536
|
||||
# define CONF_CLOCK_XOSC32K_AUTO_AMPLITUDE_CONTROL false
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT false
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_XOSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC32K_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC32K configuration - Internal 32KHz oscillator */
|
||||
# define CONF_CLOCK_OSC32K_ENABLE false
|
||||
# define CONF_CLOCK_OSC32K_STARTUP_TIME SYSTEM_OSC32K_STARTUP_130
|
||||
# define CONF_CLOCK_OSC32K_ENABLE_1KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC32K_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DFLL configuration - Digital Frequency Locked Loop */
|
||||
# define CONF_CLOCK_DFLL_ENABLE false
|
||||
# define CONF_CLOCK_DFLL_LOOP_MODE SYSTEM_CLOCK_DFLL_LOOP_MODE_OPEN
|
||||
# define CONF_CLOCK_DFLL_ON_DEMAND false
|
||||
|
||||
/* DFLL open loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_FINE_VALUE (512)
|
||||
|
||||
/* DFLL closed loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
# define CONF_CLOCK_DFLL_MULTIPLY_FACTOR 6
|
||||
# define CONF_CLOCK_DFLL_QUICK_LOCK true
|
||||
# define CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK true
|
||||
# define CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP true
|
||||
# define CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE true
|
||||
# define CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE (0x1f / 4)
|
||||
# define CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE (0xff / 4)
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DPLL configuration - Digital Phase-Locked Loop */
|
||||
# define CONF_CLOCK_DPLL_ENABLE false
|
||||
# define CONF_CLOCK_DPLL_ON_DEMAND true
|
||||
# define CONF_CLOCK_DPLL_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_DPLL_LOCK_BYPASS false
|
||||
# define CONF_CLOCK_DPLL_WAKE_UP_FAST false
|
||||
# define CONF_CLOCK_DPLL_LOW_POWER_ENABLE false
|
||||
|
||||
# define CONF_CLOCK_DPLL_LOCK_TIME SYSTEM_CLOCK_SOURCE_DPLL_LOCK_TIME_DEFAULT
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_CLOCK SYSTEM_CLOCK_SOURCE_DPLL_REFERENCE_CLOCK_XOSC32K
|
||||
# define CONF_CLOCK_DPLL_FILTER SYSTEM_CLOCK_SOURCE_DPLL_FILTER_DEFAULT
|
||||
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_FREQUENCY 32768
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_DIVIDER 1
|
||||
# define CONF_CLOCK_DPLL_OUTPUT_FREQUENCY 48000000
|
||||
|
||||
/* DPLL GCLK reference configuration */
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
/* DPLL GCLK lock timer configuration */
|
||||
# define CONF_CLOCK_DPLL_LOCK_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
|
||||
/* Set this to true to configure the GCLK when running clocks_init. If set to
|
||||
* false, none of the GCLK generators will be configured in clocks_init(). */
|
||||
# define CONF_CLOCK_CONFIGURE_GCLK true
|
||||
|
||||
/* Configure GCLK generator 0 (Main Clock) */
|
||||
# define CONF_CLOCK_GCLK_0_ENABLE true
|
||||
# define CONF_CLOCK_GCLK_0_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_0_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_0_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_0_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 1 */
|
||||
# define CONF_CLOCK_GCLK_1_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_1_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_1_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_1_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_1_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 2 (RTC) */
|
||||
# define CONF_CLOCK_GCLK_2_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_2_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_2_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC32K
|
||||
# define CONF_CLOCK_GCLK_2_PRESCALER 32
|
||||
# define CONF_CLOCK_GCLK_2_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 3 */
|
||||
# define CONF_CLOCK_GCLK_3_ENABLE true
|
||||
# define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_3_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_3_PRESCALER 16
|
||||
# define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 4 */
|
||||
# define CONF_CLOCK_GCLK_4_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_4_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_4_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_4_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_4_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 5 */
|
||||
# define CONF_CLOCK_GCLK_5_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_5_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_5_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_5_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_5_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 6 */
|
||||
# define CONF_CLOCK_GCLK_6_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_6_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_6_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_6_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_6_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 7 */
|
||||
# define CONF_CLOCK_GCLK_7_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_7_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_7_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_7_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_7_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 8 */
|
||||
# define CONF_CLOCK_GCLK_8_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_8_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_8_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC8M
|
||||
# define CONF_CLOCK_GCLK_8_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_8_OUTPUT_ENABLE false
|
||||
|
||||
#endif /* CONF_CLOCKS_H_INCLUDED */
|
|
@ -1,55 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM D21 SPI configuration
|
||||
*
|
||||
* Copyright (C) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CONF_SPI_H_INCLUDED
|
||||
# define CONF_SPI_H_INCLUDED
|
||||
|
||||
# define CONF_SPI_MASTER_ENABLE true
|
||||
# define CONF_SPI_SLAVE_ENABLE false
|
||||
|
||||
#endif /* CONF_SPI_H_INCLUDED */
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SSD1306 display controller driver configuration file.
|
||||
*
|
||||
* Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#ifndef CONF_SSD1306_H_INCLUDED
|
||||
#define CONF_SSD1306_H_INCLUDED
|
||||
|
||||
#include <board.h>
|
||||
|
||||
// Interface configuration for SAM D21 Xplained Pro
|
||||
# define SSD1306_SPI EXT3_SPI_MODULE
|
||||
# define CONFIG_SSD1306_FRAMEBUFFER
|
||||
|
||||
# define SSD1306_DC_PIN EXT3_PIN_5
|
||||
# define SSD1306_RES_PIN EXT3_PIN_10
|
||||
# define SSD1306_CS_PIN EXT3_PIN_15
|
||||
|
||||
# define SSD1306_SPI_PINMUX_SETTING EXT3_SPI_SERCOM_MUX_SETTING
|
||||
# define SSD1306_SPI_PINMUX_PAD0 EXT3_SPI_SERCOM_PINMUX_PAD0
|
||||
# define SSD1306_SPI_PINMUX_PAD1 PINMUX_UNUSED
|
||||
# define SSD1306_SPI_PINMUX_PAD2 EXT3_SPI_SERCOM_PINMUX_PAD2
|
||||
# define SSD1306_SPI_PINMUX_PAD3 EXT3_SPI_SERCOM_PINMUX_PAD3
|
||||
|
||||
// Minimum clock period is 50ns@3.3V -> max frequency is 20MHz
|
||||
#define SSD1306_CLOCK_SPEED 1000000UL
|
||||
#define SSD1306_DISPLAY_CONTRAST_MAX 40
|
||||
#define SSD1306_DISPLAY_CONTRAST_MIN 30
|
||||
|
||||
#endif /* CONF_SSD1306_H_INCLUDED */
|
File diff suppressed because one or more lines are too long
|
@ -1,52 +0,0 @@
|
|||
# List of available make goals:
|
||||
#
|
||||
# all Default target, builds the project
|
||||
# clean Clean up the project
|
||||
# rebuild Rebuild the project
|
||||
#
|
||||
#
|
||||
# doc Build the documentation
|
||||
# cleandoc Clean up the documentation
|
||||
# rebuilddoc Rebuild the documentation
|
||||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Include the common Makefile, which will also include the project specific
|
||||
# config.mk file.
|
||||
MAKEFILE_PATH = ../../../../../../../sam0/utils/make/Makefile.sam.in
|
||||
include $(MAKEFILE_PATH)
|
|
@ -1,104 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Callback API
|
||||
#include <sercom.h>
|
||||
#include <sercom_interrupt.h>
|
||||
|
||||
// From module: SERCOM SPI - Serial Peripheral Interface (Callback APIs)
|
||||
#include <spi.h>
|
||||
#include <spi_interrupt.h>
|
||||
|
||||
// From module: SSD1306 OLED controller
|
||||
#include <ssd1306.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAMD21/R21/DA/HA
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM D20/D21/R21/D09/D10/D11/DA/HA
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM D20/D21/R21/D09/D10/D11/DA/HA
|
||||
#include <reset.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,166 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Path to top level ASF directory relative to this project directory.
|
||||
PRJ_PATH = ../../../../../../..
|
||||
|
||||
# Target CPU architecture: cortex-m3, cortex-m4
|
||||
ARCH = cortex-m0plus
|
||||
|
||||
# Target part: none, sam3n4 or sam4l4aa
|
||||
PART = samd21j18a
|
||||
|
||||
# Application target name. Given with suffix .a for library and .elf for a
|
||||
# standalone application.
|
||||
TARGET_FLASH = ssd1306_example_flash.elf
|
||||
TARGET_SRAM = ssd1306_example_sram.elf
|
||||
|
||||
# List of C source files.
|
||||
CSRCS = \
|
||||
common/utils/interrupt/interrupt_sam_nvic.c \
|
||||
common2/components/display/ssd1306/example/ssd1306_example.c \
|
||||
common2/components/display/ssd1306/ssd1306.c \
|
||||
common2/services/delay/sam0/systick_counter.c \
|
||||
sam0/boards/samd21_xplained_pro/board_init.c \
|
||||
sam0/drivers/port/port.c \
|
||||
sam0/drivers/sercom/sercom.c \
|
||||
sam0/drivers/sercom/sercom_interrupt.c \
|
||||
sam0/drivers/sercom/spi/spi.c \
|
||||
sam0/drivers/sercom/spi/spi_interrupt.c \
|
||||
sam0/drivers/system/clock/clock_samd21_r21_da_ha1/clock.c \
|
||||
sam0/drivers/system/clock/clock_samd21_r21_da_ha1/gclk.c \
|
||||
sam0/drivers/system/interrupt/system_interrupt.c \
|
||||
sam0/drivers/system/pinmux/pinmux.c \
|
||||
sam0/drivers/system/system.c \
|
||||
sam0/utils/cmsis/samd21/source/gcc/startup_samd21.c \
|
||||
sam0/utils/cmsis/samd21/source/system_samd21.c \
|
||||
sam0/utils/syscalls/gcc/syscalls.c
|
||||
|
||||
# List of assembler source files.
|
||||
ASSRCS =
|
||||
|
||||
# List of include paths.
|
||||
INC_PATH = \
|
||||
common/boards \
|
||||
common/utils \
|
||||
common2/components/display/ssd1306 \
|
||||
common2/components/display/ssd1306/example/samd21_xplained_pro \
|
||||
common2/services/delay \
|
||||
common2/services/delay/sam0 \
|
||||
sam0/boards \
|
||||
sam0/boards/samd21_xplained_pro \
|
||||
sam0/drivers/port \
|
||||
sam0/drivers/sercom \
|
||||
sam0/drivers/sercom/spi \
|
||||
sam0/drivers/system \
|
||||
sam0/drivers/system/clock \
|
||||
sam0/drivers/system/clock/clock_samd21_r21_da_ha1 \
|
||||
sam0/drivers/system/interrupt \
|
||||
sam0/drivers/system/interrupt/system_interrupt_samd21 \
|
||||
sam0/drivers/system/pinmux \
|
||||
sam0/drivers/system/power \
|
||||
sam0/drivers/system/power/power_sam_d_r_h \
|
||||
sam0/drivers/system/reset \
|
||||
sam0/drivers/system/reset/reset_sam_d_r_h \
|
||||
sam0/utils \
|
||||
sam0/utils/cmsis/samd21/include \
|
||||
sam0/utils/cmsis/samd21/source \
|
||||
sam0/utils/header_files \
|
||||
sam0/utils/preprocessor \
|
||||
thirdparty/CMSIS/Include \
|
||||
thirdparty/CMSIS/Lib/GCC \
|
||||
common2/components/display/ssd1306/example/samd21_xplained_pro/gcc
|
||||
|
||||
# Additional search paths for libraries.
|
||||
LIB_PATH = \
|
||||
thirdparty/CMSIS/Lib/GCC
|
||||
|
||||
# List of libraries to use during linking.
|
||||
LIBS = \
|
||||
arm_cortexM0l_math
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
LINKER_SCRIPT_FLASH = sam0/utils/linker_scripts/samd21/gcc/samd21j18a_flash.ld
|
||||
LINKER_SCRIPT_SRAM = sam0/utils/linker_scripts/samd21/gcc/samd21j18a_sram.ld
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
DEBUG_SCRIPT_FLASH = sam0/boards/samd21_xplained_pro/debug_scripts/gcc/samd21_xplained_pro_flash.gdb
|
||||
DEBUG_SCRIPT_SRAM = sam0/boards/samd21_xplained_pro/debug_scripts/gcc/samd21_xplained_pro_sram.gdb
|
||||
|
||||
# Project type parameter: all, sram or flash
|
||||
PROJECT_TYPE = flash
|
||||
|
||||
# Additional options for debugging. By default the common Makefile.in will
|
||||
# add -g3.
|
||||
DBGFLAGS =
|
||||
|
||||
# Application optimization used during compilation and linking:
|
||||
# -O0, -O1, -O2, -O3 or -Os
|
||||
OPTIMIZATION = -O1
|
||||
|
||||
# Extra flags to use when archiving.
|
||||
ARFLAGS =
|
||||
|
||||
# Extra flags to use when assembling.
|
||||
ASFLAGS =
|
||||
|
||||
# Extra flags to use when compiling.
|
||||
CFLAGS =
|
||||
|
||||
# Extra flags to use when preprocessing.
|
||||
#
|
||||
# Preprocessor symbol definitions
|
||||
# To add a definition use the format "-D name[=definition]".
|
||||
# To cancel a definition use the format "-U name".
|
||||
#
|
||||
# The most relevant symbols to define for the preprocessor are:
|
||||
# BOARD Target board in use, see boards/board.h for a list.
|
||||
# EXT_BOARD Optional extension board in use, see boards/board.h for a list.
|
||||
CPPFLAGS = \
|
||||
-D ARM_MATH_CM0PLUS=true \
|
||||
-D BOARD=SAMD21_XPLAINED_PRO \
|
||||
-D SPI_CALLBACK_MODE=true \
|
||||
-D SYSTICK_MODE \
|
||||
-D __SAMD21J18A__
|
||||
|
||||
# Extra flags to use when linking
|
||||
LDFLAGS = \
|
||||
|
||||
# Pre- and post-build commands
|
||||
PREBUILD_CMD =
|
||||
POSTBUILD_CMD =
|
|
@ -1,104 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Callback API
|
||||
#include <sercom.h>
|
||||
#include <sercom_interrupt.h>
|
||||
|
||||
// From module: SERCOM SPI - Serial Peripheral Interface (Callback APIs)
|
||||
#include <spi.h>
|
||||
#include <spi_interrupt.h>
|
||||
|
||||
// From module: SSD1306 OLED controller
|
||||
#include <ssd1306.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAMD21/R21/DA/HA
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM D20/D21/R21/D09/D10/D11/DA/HA
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM D20/D21/R21/D09/D10/D11/DA/HA
|
||||
#include <reset.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,6 +0,0 @@
|
|||
<workspace>
|
||||
<batchBuild></batchBuild>
|
||||
<project>
|
||||
<path>$WS_DIR$\ssd1306_example_flash.ewp</path>
|
||||
</project>
|
||||
</workspace>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,50 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM L21 Xplained Pro board configuration.
|
||||
*
|
||||
* Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef CONF_BOARD_H_INCLUDED
|
||||
#define CONF_BOARD_H_INCLUDED
|
||||
|
||||
#endif /* CONF_BOARD_H_INCLUDED */
|
|
@ -1,200 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM L21 Clock configuration
|
||||
*
|
||||
* Copyright (C) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#include <clock.h>
|
||||
|
||||
#ifndef CONF_CLOCKS_H_INCLUDED
|
||||
# define CONF_CLOCKS_H_INCLUDED
|
||||
|
||||
/* System clock bus configuration */
|
||||
# define CONF_CLOCK_CPU_CLOCK_FAILURE_DETECT false
|
||||
# define CONF_CLOCK_FLASH_WAIT_STATES 0
|
||||
# define CONF_CLOCK_CPU_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_LOW_POWER_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_BACKUP_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC16M configuration - Internal 16MHz oscillator */
|
||||
# define CONF_CLOCK_OSC16M_FREQ_SEL SYSTEM_OSC16M_4M
|
||||
# define CONF_CLOCK_OSC16M_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC16M_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC configuration - External clock/oscillator */
|
||||
# define CONF_CLOCK_XOSC_ENABLE false
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY 12000000UL
|
||||
# define CONF_CLOCK_XOSC_STARTUP_TIME SYSTEM_XOSC_STARTUP_32768
|
||||
# define CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL true
|
||||
# define CONF_CLOCK_XOSC_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC32K configuration - External 32KHz crystal/clock oscillator */
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE false
|
||||
# define CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC32K_STARTUP_TIME SYSTEM_XOSC32K_STARTUP_65536
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT false
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_XOSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC32K_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC32K configuration - Internal 32KHz oscillator */
|
||||
# define CONF_CLOCK_OSC32K_ENABLE false
|
||||
# define CONF_CLOCK_OSC32K_STARTUP_TIME SYSTEM_OSC32K_STARTUP_130
|
||||
# define CONF_CLOCK_OSC32K_ENABLE_1KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC32K_RUN_IN_STANDBY false
|
||||
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DFLL configuration - Digital Frequency Locked Loop */
|
||||
# define CONF_CLOCK_DFLL_ENABLE false
|
||||
# define CONF_CLOCK_DFLL_LOOP_MODE SYSTEM_CLOCK_DFLL_LOOP_MODE_OPEN
|
||||
# define CONF_CLOCK_DFLL_ON_DEMAND false
|
||||
# define CONF_CLOCK_DFLL_RUN_IN_STANDBY false
|
||||
|
||||
/* DFLL open loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_FINE_VALUE (512)
|
||||
|
||||
/* DFLL closed loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
# define CONF_CLOCK_DFLL_MULTIPLY_FACTOR (48000000 / 32768)
|
||||
# define CONF_CLOCK_DFLL_QUICK_LOCK true
|
||||
# define CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK true
|
||||
# define CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP true
|
||||
# define CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE true
|
||||
# define CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE (0x1f / 4)
|
||||
# define CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE (0xff / 4)
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DPLL configuration - Digital Phase-Locked Loop */
|
||||
# define CONF_CLOCK_DPLL_ENABLE false
|
||||
# define CONF_CLOCK_DPLL_ON_DEMAND true
|
||||
# define CONF_CLOCK_DPLL_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_DPLL_LOCK_BYPASS false
|
||||
# define CONF_CLOCK_DPLL_WAKE_UP_FAST false
|
||||
# define CONF_CLOCK_DPLL_LOW_POWER_ENABLE false
|
||||
|
||||
# define CONF_CLOCK_DPLL_LOCK_TIME SYSTEM_CLOCK_SOURCE_DPLL_LOCK_TIME_DEFAULT
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_CLOCK SYSTEM_CLOCK_SOURCE_DPLL_REFERENCE_CLOCK_XOSC32K
|
||||
# define CONF_CLOCK_DPLL_FILTER SYSTEM_CLOCK_SOURCE_DPLL_FILTER_DEFAULT
|
||||
# define CONF_CLOCK_DPLL_PRESCALER SYSTEM_CLOCK_SOURCE_DPLL_DIV_1
|
||||
|
||||
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_FREQUENCY 32768
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_DIVIDER 1
|
||||
# define CONF_CLOCK_DPLL_OUTPUT_FREQUENCY 48000000
|
||||
|
||||
/* DPLL GCLK reference configuration */
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
/* DPLL GCLK lock timer configuration */
|
||||
# define CONF_CLOCK_DPLL_LOCK_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
|
||||
|
||||
/* Set this to true to configure the GCLK when running clocks_init. If set to
|
||||
* false, none of the GCLK generators will be configured in clocks_init(). */
|
||||
# define CONF_CLOCK_CONFIGURE_GCLK true
|
||||
|
||||
/* Configure GCLK generator 0 (Main Clock) */
|
||||
# define CONF_CLOCK_GCLK_0_ENABLE true
|
||||
# define CONF_CLOCK_GCLK_0_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_0_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_0_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_0_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 1 */
|
||||
# define CONF_CLOCK_GCLK_1_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_1_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_1_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_XOSC32K
|
||||
# define CONF_CLOCK_GCLK_1_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_1_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 2 */
|
||||
# define CONF_CLOCK_GCLK_2_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_2_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_2_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_2_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_2_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 3 */
|
||||
# define CONF_CLOCK_GCLK_3_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_3_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_3_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 4 */
|
||||
# define CONF_CLOCK_GCLK_4_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_4_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_4_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_4_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_4_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 5 */
|
||||
# define CONF_CLOCK_GCLK_5_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_5_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_5_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_5_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_5_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 6 */
|
||||
# define CONF_CLOCK_GCLK_6_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_6_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_6_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_6_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_6_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 7 */
|
||||
# define CONF_CLOCK_GCLK_7_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_7_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_7_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_7_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_7_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 8 */
|
||||
# define CONF_CLOCK_GCLK_8_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_8_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_8_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_8_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_8_OUTPUT_ENABLE false
|
||||
#endif /* CONF_CLOCKS_H_INCLUDED */
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM L21 SPI configuration
|
||||
*
|
||||
* Copyright (C) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CONF_SPI_H_INCLUDED
|
||||
# define CONF_SPI_H_INCLUDED
|
||||
|
||||
# define CONF_SPI_MASTER_ENABLE true
|
||||
# define CONF_SPI_SLAVE_ENABLE false
|
||||
|
||||
#endif /* CONF_SPI_H_INCLUDED */
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SSD1306 display controller driver configuration file.
|
||||
*
|
||||
* Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#ifndef CONF_SSD1306_H_INCLUDED
|
||||
#define CONF_SSD1306_H_INCLUDED
|
||||
|
||||
#include <board.h>
|
||||
|
||||
// Interface configuration for SAM L21 Xplained Pro
|
||||
# define SSD1306_SPI EXT3_SPI_MODULE
|
||||
# define CONFIG_SSD1306_FRAMEBUFFER
|
||||
|
||||
# define SSD1306_DC_PIN EXT3_PIN_5
|
||||
# define SSD1306_RES_PIN EXT3_PIN_10
|
||||
# define SSD1306_CS_PIN EXT3_PIN_15
|
||||
|
||||
# define SSD1306_SPI_PINMUX_SETTING EXT3_SPI_SERCOM_MUX_SETTING
|
||||
# define SSD1306_SPI_PINMUX_PAD0 EXT3_SPI_SERCOM_PINMUX_PAD0
|
||||
# define SSD1306_SPI_PINMUX_PAD1 PINMUX_UNUSED
|
||||
# define SSD1306_SPI_PINMUX_PAD2 EXT3_SPI_SERCOM_PINMUX_PAD2
|
||||
# define SSD1306_SPI_PINMUX_PAD3 EXT3_SPI_SERCOM_PINMUX_PAD3
|
||||
|
||||
// Minimum clock period is 50ns@3.3V -> max frequency is 20MHz
|
||||
#define SSD1306_CLOCK_SPEED 1000000UL
|
||||
#define SSD1306_DISPLAY_CONTRAST_MAX 40
|
||||
#define SSD1306_DISPLAY_CONTRAST_MIN 30
|
||||
|
||||
#endif /* CONF_SSD1306_H_INCLUDED */
|
File diff suppressed because one or more lines are too long
|
@ -1,52 +0,0 @@
|
|||
# List of available make goals:
|
||||
#
|
||||
# all Default target, builds the project
|
||||
# clean Clean up the project
|
||||
# rebuild Rebuild the project
|
||||
#
|
||||
#
|
||||
# doc Build the documentation
|
||||
# cleandoc Clean up the documentation
|
||||
# rebuilddoc Rebuild the documentation
|
||||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Include the common Makefile, which will also include the project specific
|
||||
# config.mk file.
|
||||
MAKEFILE_PATH = ../../../../../../../sam0/utils/make/Makefile.sam.in
|
||||
include $(MAKEFILE_PATH)
|
|
@ -1,104 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Callback API
|
||||
#include <sercom.h>
|
||||
#include <sercom_interrupt.h>
|
||||
|
||||
// From module: SERCOM SPI - Serial Peripheral Interface (Callback APIs)
|
||||
#include <spi.h>
|
||||
#include <spi_interrupt.h>
|
||||
|
||||
// From module: SSD1306 OLED controller
|
||||
#include <ssd1306.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAML21
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver For SAML21
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM L21
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM L21
|
||||
#include <reset.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,166 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Path to top level ASF directory relative to this project directory.
|
||||
PRJ_PATH = ../../../../../../..
|
||||
|
||||
# Target CPU architecture: cortex-m3, cortex-m4
|
||||
ARCH = cortex-m0plus
|
||||
|
||||
# Target part: none, sam3n4 or sam4l4aa
|
||||
PART = saml21j18a
|
||||
|
||||
# Application target name. Given with suffix .a for library and .elf for a
|
||||
# standalone application.
|
||||
TARGET_FLASH = ssd1306_example_flash.elf
|
||||
TARGET_SRAM = ssd1306_example_sram.elf
|
||||
|
||||
# List of C source files.
|
||||
CSRCS = \
|
||||
common/utils/interrupt/interrupt_sam_nvic.c \
|
||||
common2/components/display/ssd1306/example/ssd1306_example.c \
|
||||
common2/components/display/ssd1306/ssd1306.c \
|
||||
common2/services/delay/sam0/systick_counter.c \
|
||||
sam0/boards/saml21_xplained_pro/board_init.c \
|
||||
sam0/drivers/port/port.c \
|
||||
sam0/drivers/sercom/sercom.c \
|
||||
sam0/drivers/sercom/sercom_interrupt.c \
|
||||
sam0/drivers/sercom/spi/spi.c \
|
||||
sam0/drivers/sercom/spi/spi_interrupt.c \
|
||||
sam0/drivers/system/clock/clock_saml21/clock.c \
|
||||
sam0/drivers/system/clock/clock_saml21/gclk.c \
|
||||
sam0/drivers/system/interrupt/system_interrupt.c \
|
||||
sam0/drivers/system/pinmux/pinmux.c \
|
||||
sam0/drivers/system/system.c \
|
||||
sam0/utils/cmsis/saml21/source/gcc/startup_saml21.c \
|
||||
sam0/utils/cmsis/saml21/source/system_saml21.c \
|
||||
sam0/utils/syscalls/gcc/syscalls.c
|
||||
|
||||
# List of assembler source files.
|
||||
ASSRCS =
|
||||
|
||||
# List of include paths.
|
||||
INC_PATH = \
|
||||
common/boards \
|
||||
common/utils \
|
||||
common2/components/display/ssd1306 \
|
||||
common2/components/display/ssd1306/example/saml21_xplained_pro \
|
||||
common2/services/delay \
|
||||
common2/services/delay/sam0 \
|
||||
sam0/boards \
|
||||
sam0/boards/saml21_xplained_pro \
|
||||
sam0/drivers/port \
|
||||
sam0/drivers/sercom \
|
||||
sam0/drivers/sercom/spi \
|
||||
sam0/drivers/system \
|
||||
sam0/drivers/system/clock \
|
||||
sam0/drivers/system/clock/clock_saml21 \
|
||||
sam0/drivers/system/interrupt \
|
||||
sam0/drivers/system/interrupt/system_interrupt_saml21 \
|
||||
sam0/drivers/system/pinmux \
|
||||
sam0/drivers/system/power \
|
||||
sam0/drivers/system/power/power_sam_l \
|
||||
sam0/drivers/system/reset \
|
||||
sam0/drivers/system/reset/reset_sam_l \
|
||||
sam0/utils \
|
||||
sam0/utils/cmsis/saml21/include \
|
||||
sam0/utils/cmsis/saml21/source \
|
||||
sam0/utils/header_files \
|
||||
sam0/utils/preprocessor \
|
||||
thirdparty/CMSIS/Include \
|
||||
thirdparty/CMSIS/Lib/GCC \
|
||||
common2/components/display/ssd1306/example/saml21_xplained_pro/gcc
|
||||
|
||||
# Additional search paths for libraries.
|
||||
LIB_PATH = \
|
||||
thirdparty/CMSIS/Lib/GCC
|
||||
|
||||
# List of libraries to use during linking.
|
||||
LIBS = \
|
||||
arm_cortexM0l_math
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
LINKER_SCRIPT_FLASH = sam0/utils/linker_scripts/saml21/gcc/saml21j18a_flash.ld
|
||||
LINKER_SCRIPT_SRAM = sam0/utils/linker_scripts/saml21/gcc/saml21j18a_sram.ld
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
DEBUG_SCRIPT_FLASH = sam0/boards/saml21_xplained_pro/debug_scripts/gcc/saml21_xplained_pro_flash.gdb
|
||||
DEBUG_SCRIPT_SRAM = sam0/boards/saml21_xplained_pro/debug_scripts/gcc/saml21_xplained_pro_sram.gdb
|
||||
|
||||
# Project type parameter: all, sram or flash
|
||||
PROJECT_TYPE = flash
|
||||
|
||||
# Additional options for debugging. By default the common Makefile.in will
|
||||
# add -g3.
|
||||
DBGFLAGS =
|
||||
|
||||
# Application optimization used during compilation and linking:
|
||||
# -O0, -O1, -O2, -O3 or -Os
|
||||
OPTIMIZATION = -O1
|
||||
|
||||
# Extra flags to use when archiving.
|
||||
ARFLAGS =
|
||||
|
||||
# Extra flags to use when assembling.
|
||||
ASFLAGS =
|
||||
|
||||
# Extra flags to use when compiling.
|
||||
CFLAGS =
|
||||
|
||||
# Extra flags to use when preprocessing.
|
||||
#
|
||||
# Preprocessor symbol definitions
|
||||
# To add a definition use the format "-D name[=definition]".
|
||||
# To cancel a definition use the format "-U name".
|
||||
#
|
||||
# The most relevant symbols to define for the preprocessor are:
|
||||
# BOARD Target board in use, see boards/board.h for a list.
|
||||
# EXT_BOARD Optional extension board in use, see boards/board.h for a list.
|
||||
CPPFLAGS = \
|
||||
-D ARM_MATH_CM0PLUS=true \
|
||||
-D BOARD=SAML21_XPLAINED_PRO \
|
||||
-D SPI_CALLBACK_MODE=true \
|
||||
-D SYSTICK_MODE \
|
||||
-D __SAML21J18A__
|
||||
|
||||
# Extra flags to use when linking
|
||||
LDFLAGS = \
|
||||
|
||||
# Pre- and post-build commands
|
||||
PREBUILD_CMD =
|
||||
POSTBUILD_CMD =
|
|
@ -1,104 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Callback API
|
||||
#include <sercom.h>
|
||||
#include <sercom_interrupt.h>
|
||||
|
||||
// From module: SERCOM SPI - Serial Peripheral Interface (Callback APIs)
|
||||
#include <spi.h>
|
||||
#include <spi_interrupt.h>
|
||||
|
||||
// From module: SSD1306 OLED controller
|
||||
#include <ssd1306.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAML21
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver For SAML21
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM L21
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM L21
|
||||
#include <reset.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,6 +0,0 @@
|
|||
<workspace>
|
||||
<batchBuild></batchBuild>
|
||||
<project>
|
||||
<path>$WS_DIR$\ssd1306_example_flash.ewp</path>
|
||||
</project>
|
||||
</workspace>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,50 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM L21 Xplained Pro board configuration.
|
||||
*
|
||||
* Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef CONF_BOARD_H_INCLUDED
|
||||
#define CONF_BOARD_H_INCLUDED
|
||||
|
||||
#endif /* CONF_BOARD_H_INCLUDED */
|
|
@ -1,201 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM L21 Clock configuration
|
||||
*
|
||||
* Copyright (C) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#include <clock.h>
|
||||
|
||||
#ifndef CONF_CLOCKS_H_INCLUDED
|
||||
# define CONF_CLOCKS_H_INCLUDED
|
||||
|
||||
/* System clock bus configuration */
|
||||
# define CONF_CLOCK_CPU_CLOCK_FAILURE_DETECT false
|
||||
# define CONF_CLOCK_FLASH_WAIT_STATES 0
|
||||
# define CONF_CLOCK_CPU_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_LOW_POWER_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_BACKUP_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC16M configuration - Internal 16MHz oscillator */
|
||||
# define CONF_CLOCK_OSC16M_FREQ_SEL SYSTEM_OSC16M_4M
|
||||
# define CONF_CLOCK_OSC16M_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC16M_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC configuration - External clock/oscillator */
|
||||
# define CONF_CLOCK_XOSC_ENABLE false
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY 12000000UL
|
||||
# define CONF_CLOCK_XOSC_STARTUP_TIME SYSTEM_XOSC_STARTUP_32768
|
||||
# define CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL true
|
||||
# define CONF_CLOCK_XOSC_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC32K configuration - External 32KHz crystal/clock oscillator */
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE false
|
||||
# define CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC32K_STARTUP_TIME SYSTEM_XOSC32K_STARTUP_65536
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT false
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_XOSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC32K_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC32K configuration - Internal 32KHz oscillator */
|
||||
# define CONF_CLOCK_OSC32K_ENABLE false
|
||||
# define CONF_CLOCK_OSC32K_STARTUP_TIME SYSTEM_OSC32K_STARTUP_130
|
||||
# define CONF_CLOCK_OSC32K_ENABLE_1KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC32K_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSCULP32K configuration - Internal Ultra Low Power 32KHz oscillator */
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DFLL configuration - Digital Frequency Locked Loop */
|
||||
# define CONF_CLOCK_DFLL_ENABLE false
|
||||
# define CONF_CLOCK_DFLL_LOOP_MODE SYSTEM_CLOCK_DFLL_LOOP_MODE_OPEN
|
||||
# define CONF_CLOCK_DFLL_ON_DEMAND false
|
||||
# define CONF_CLOCK_DFLL_RUN_IN_STANDBY false
|
||||
|
||||
/* DFLL open loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_FINE_VALUE (512)
|
||||
|
||||
/* DFLL closed loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
# define CONF_CLOCK_DFLL_MULTIPLY_FACTOR (48000000 / 32768)
|
||||
# define CONF_CLOCK_DFLL_QUICK_LOCK true
|
||||
# define CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK true
|
||||
# define CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP true
|
||||
# define CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE true
|
||||
# define CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE (0x1f / 4)
|
||||
# define CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE (0xff / 4)
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DPLL configuration - Digital Phase-Locked Loop */
|
||||
# define CONF_CLOCK_DPLL_ENABLE false
|
||||
# define CONF_CLOCK_DPLL_ON_DEMAND true
|
||||
# define CONF_CLOCK_DPLL_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_DPLL_LOCK_BYPASS false
|
||||
# define CONF_CLOCK_DPLL_WAKE_UP_FAST false
|
||||
# define CONF_CLOCK_DPLL_LOW_POWER_ENABLE false
|
||||
|
||||
# define CONF_CLOCK_DPLL_LOCK_TIME SYSTEM_CLOCK_SOURCE_DPLL_LOCK_TIME_DEFAULT
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_CLOCK SYSTEM_CLOCK_SOURCE_DPLL_REFERENCE_CLOCK_XOSC32K
|
||||
# define CONF_CLOCK_DPLL_FILTER SYSTEM_CLOCK_SOURCE_DPLL_FILTER_DEFAULT
|
||||
# define CONF_CLOCK_DPLL_PRESCALER SYSTEM_CLOCK_SOURCE_DPLL_DIV_1
|
||||
|
||||
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_FREQUENCY 32768
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_DIVIDER 1
|
||||
# define CONF_CLOCK_DPLL_OUTPUT_FREQUENCY 48000000
|
||||
|
||||
/* DPLL GCLK reference configuration */
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
/* DPLL GCLK lock timer configuration */
|
||||
# define CONF_CLOCK_DPLL_LOCK_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
|
||||
|
||||
/* Set this to true to configure the GCLK when running clocks_init. If set to
|
||||
* false, none of the GCLK generators will be configured in clocks_init(). */
|
||||
# define CONF_CLOCK_CONFIGURE_GCLK true
|
||||
|
||||
/* Configure GCLK generator 0 (Main Clock) */
|
||||
# define CONF_CLOCK_GCLK_0_ENABLE true
|
||||
# define CONF_CLOCK_GCLK_0_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_0_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_0_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_0_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 1 */
|
||||
# define CONF_CLOCK_GCLK_1_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_1_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_1_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_XOSC32K
|
||||
# define CONF_CLOCK_GCLK_1_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_1_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 2 */
|
||||
# define CONF_CLOCK_GCLK_2_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_2_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_2_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_2_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_2_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 3 */
|
||||
# define CONF_CLOCK_GCLK_3_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_3_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_3_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 4 */
|
||||
# define CONF_CLOCK_GCLK_4_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_4_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_4_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_4_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_4_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 5 */
|
||||
# define CONF_CLOCK_GCLK_5_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_5_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_5_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_5_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_5_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 6 */
|
||||
# define CONF_CLOCK_GCLK_6_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_6_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_6_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_6_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_6_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 7 */
|
||||
# define CONF_CLOCK_GCLK_7_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_7_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_7_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_7_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_7_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 8 */
|
||||
# define CONF_CLOCK_GCLK_8_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_8_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_8_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_8_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_8_OUTPUT_ENABLE false
|
||||
#endif /* CONF_CLOCKS_H_INCLUDED */
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM L21 SPI configuration
|
||||
*
|
||||
* Copyright (C) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef CONF_SPI_H_INCLUDED
|
||||
# define CONF_SPI_H_INCLUDED
|
||||
|
||||
# define CONF_SPI_MASTER_ENABLE true
|
||||
# define CONF_SPI_SLAVE_ENABLE false
|
||||
|
||||
#endif /* CONF_SPI_H_INCLUDED */
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SSD1306 display controller driver configuration file.
|
||||
*
|
||||
* Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#ifndef CONF_SSD1306_H_INCLUDED
|
||||
#define CONF_SSD1306_H_INCLUDED
|
||||
|
||||
#include <board.h>
|
||||
|
||||
// Interface configuration for SAM L21 Xplained Pro
|
||||
# define SSD1306_SPI EXT3_SPI_MODULE
|
||||
# define CONFIG_SSD1306_FRAMEBUFFER
|
||||
|
||||
# define SSD1306_DC_PIN EXT3_PIN_5
|
||||
# define SSD1306_RES_PIN EXT3_PIN_10
|
||||
# define SSD1306_CS_PIN EXT3_PIN_15
|
||||
|
||||
# define SSD1306_SPI_PINMUX_SETTING EXT3_SPI_SERCOM_MUX_SETTING
|
||||
# define SSD1306_SPI_PINMUX_PAD0 EXT3_SPI_SERCOM_PINMUX_PAD0
|
||||
# define SSD1306_SPI_PINMUX_PAD1 PINMUX_UNUSED
|
||||
# define SSD1306_SPI_PINMUX_PAD2 EXT3_SPI_SERCOM_PINMUX_PAD2
|
||||
# define SSD1306_SPI_PINMUX_PAD3 EXT3_SPI_SERCOM_PINMUX_PAD3
|
||||
|
||||
// Minimum clock period is 50ns@3.3V -> max frequency is 20MHz
|
||||
#define SSD1306_CLOCK_SPEED 1000000UL
|
||||
#define SSD1306_DISPLAY_CONTRAST_MAX 40
|
||||
#define SSD1306_DISPLAY_CONTRAST_MIN 30
|
||||
|
||||
#endif /* CONF_SSD1306_H_INCLUDED */
|
File diff suppressed because one or more lines are too long
|
@ -1,52 +0,0 @@
|
|||
# List of available make goals:
|
||||
#
|
||||
# all Default target, builds the project
|
||||
# clean Clean up the project
|
||||
# rebuild Rebuild the project
|
||||
#
|
||||
#
|
||||
# doc Build the documentation
|
||||
# cleandoc Clean up the documentation
|
||||
# rebuilddoc Rebuild the documentation
|
||||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Include the common Makefile, which will also include the project specific
|
||||
# config.mk file.
|
||||
MAKEFILE_PATH = ../../../../../../../sam0/utils/make/Makefile.sam.in
|
||||
include $(MAKEFILE_PATH)
|
|
@ -1,104 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Callback API
|
||||
#include <sercom.h>
|
||||
#include <sercom_interrupt.h>
|
||||
|
||||
// From module: SERCOM SPI - Serial Peripheral Interface (Callback APIs)
|
||||
#include <spi.h>
|
||||
#include <spi_interrupt.h>
|
||||
|
||||
// From module: SSD1306 OLED controller
|
||||
#include <ssd1306.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAML21
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver For SAML21
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM L21
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM L21
|
||||
#include <reset.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,166 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2011 Atmel Corporation. All rights reserved.
|
||||
#
|
||||
# \asf_license_start
|
||||
#
|
||||
# \page License
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
# from this software without specific prior written permission.
|
||||
#
|
||||
# 4. This software may only be redistributed and used in connection with an
|
||||
# Atmel microcontroller product.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
# EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# \asf_license_stop
|
||||
#
|
||||
|
||||
# Path to top level ASF directory relative to this project directory.
|
||||
PRJ_PATH = ../../../../../../..
|
||||
|
||||
# Target CPU architecture: cortex-m3, cortex-m4
|
||||
ARCH = cortex-m0plus
|
||||
|
||||
# Target part: none, sam3n4 or sam4l4aa
|
||||
PART = saml21j18b
|
||||
|
||||
# Application target name. Given with suffix .a for library and .elf for a
|
||||
# standalone application.
|
||||
TARGET_FLASH = ssd1306_example_flash.elf
|
||||
TARGET_SRAM = ssd1306_example_sram.elf
|
||||
|
||||
# List of C source files.
|
||||
CSRCS = \
|
||||
common/utils/interrupt/interrupt_sam_nvic.c \
|
||||
common2/components/display/ssd1306/example/ssd1306_example.c \
|
||||
common2/components/display/ssd1306/ssd1306.c \
|
||||
common2/services/delay/sam0/systick_counter.c \
|
||||
sam0/boards/saml21_xplained_pro_b/board_init.c \
|
||||
sam0/drivers/port/port.c \
|
||||
sam0/drivers/sercom/sercom.c \
|
||||
sam0/drivers/sercom/sercom_interrupt.c \
|
||||
sam0/drivers/sercom/spi/spi.c \
|
||||
sam0/drivers/sercom/spi/spi_interrupt.c \
|
||||
sam0/drivers/system/clock/clock_saml21/clock.c \
|
||||
sam0/drivers/system/clock/clock_saml21/gclk.c \
|
||||
sam0/drivers/system/interrupt/system_interrupt.c \
|
||||
sam0/drivers/system/pinmux/pinmux.c \
|
||||
sam0/drivers/system/system.c \
|
||||
sam0/utils/cmsis/saml21/source/gcc/startup_saml21.c \
|
||||
sam0/utils/cmsis/saml21/source/system_saml21.c \
|
||||
sam0/utils/syscalls/gcc/syscalls.c
|
||||
|
||||
# List of assembler source files.
|
||||
ASSRCS =
|
||||
|
||||
# List of include paths.
|
||||
INC_PATH = \
|
||||
common/boards \
|
||||
common/utils \
|
||||
common2/components/display/ssd1306 \
|
||||
common2/components/display/ssd1306/example/saml21_xplained_pro_b \
|
||||
common2/services/delay \
|
||||
common2/services/delay/sam0 \
|
||||
sam0/boards \
|
||||
sam0/boards/saml21_xplained_pro_b \
|
||||
sam0/drivers/port \
|
||||
sam0/drivers/sercom \
|
||||
sam0/drivers/sercom/spi \
|
||||
sam0/drivers/system \
|
||||
sam0/drivers/system/clock \
|
||||
sam0/drivers/system/clock/clock_saml21 \
|
||||
sam0/drivers/system/interrupt \
|
||||
sam0/drivers/system/interrupt/system_interrupt_saml21 \
|
||||
sam0/drivers/system/pinmux \
|
||||
sam0/drivers/system/power \
|
||||
sam0/drivers/system/power/power_sam_l \
|
||||
sam0/drivers/system/reset \
|
||||
sam0/drivers/system/reset/reset_sam_l \
|
||||
sam0/utils \
|
||||
sam0/utils/cmsis/saml21/include_b \
|
||||
sam0/utils/cmsis/saml21/source \
|
||||
sam0/utils/header_files \
|
||||
sam0/utils/preprocessor \
|
||||
thirdparty/CMSIS/Include \
|
||||
thirdparty/CMSIS/Lib/GCC \
|
||||
common2/components/display/ssd1306/example/saml21_xplained_pro_b/gcc
|
||||
|
||||
# Additional search paths for libraries.
|
||||
LIB_PATH = \
|
||||
thirdparty/CMSIS/Lib/GCC
|
||||
|
||||
# List of libraries to use during linking.
|
||||
LIBS = \
|
||||
arm_cortexM0l_math
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
LINKER_SCRIPT_FLASH = sam0/utils/linker_scripts/saml21/gcc/saml21j18b_flash.ld
|
||||
LINKER_SCRIPT_SRAM = sam0/utils/linker_scripts/saml21/gcc/saml21j18b_sram.ld
|
||||
|
||||
# Path relative to top level directory pointing to a linker script.
|
||||
DEBUG_SCRIPT_FLASH = sam0/boards/saml21_xplained_pro_b/debug_scripts/gcc/saml21_xplained_pro_flash.gdb
|
||||
DEBUG_SCRIPT_SRAM = sam0/boards/saml21_xplained_pro_b/debug_scripts/gcc/saml21_xplained_pro_sram.gdb
|
||||
|
||||
# Project type parameter: all, sram or flash
|
||||
PROJECT_TYPE = flash
|
||||
|
||||
# Additional options for debugging. By default the common Makefile.in will
|
||||
# add -g3.
|
||||
DBGFLAGS =
|
||||
|
||||
# Application optimization used during compilation and linking:
|
||||
# -O0, -O1, -O2, -O3 or -Os
|
||||
OPTIMIZATION = -O1
|
||||
|
||||
# Extra flags to use when archiving.
|
||||
ARFLAGS =
|
||||
|
||||
# Extra flags to use when assembling.
|
||||
ASFLAGS =
|
||||
|
||||
# Extra flags to use when compiling.
|
||||
CFLAGS =
|
||||
|
||||
# Extra flags to use when preprocessing.
|
||||
#
|
||||
# Preprocessor symbol definitions
|
||||
# To add a definition use the format "-D name[=definition]".
|
||||
# To cancel a definition use the format "-U name".
|
||||
#
|
||||
# The most relevant symbols to define for the preprocessor are:
|
||||
# BOARD Target board in use, see boards/board.h for a list.
|
||||
# EXT_BOARD Optional extension board in use, see boards/board.h for a list.
|
||||
CPPFLAGS = \
|
||||
-D ARM_MATH_CM0PLUS=true \
|
||||
-D BOARD=SAML21_XPLAINED_PRO \
|
||||
-D SPI_CALLBACK_MODE=true \
|
||||
-D SYSTICK_MODE \
|
||||
-D __SAML21J18B__
|
||||
|
||||
# Extra flags to use when linking
|
||||
LDFLAGS = \
|
||||
|
||||
# Pre- and post-build commands
|
||||
PREBUILD_CMD =
|
||||
POSTBUILD_CMD =
|
|
@ -1,104 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
|
||||
*
|
||||
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef ASF_H
|
||||
#define ASF_H
|
||||
|
||||
/*
|
||||
* This file includes all API header files for the selected drivers from ASF.
|
||||
* Note: There might be duplicate includes required by more than one driver.
|
||||
*
|
||||
* The file is automatically generated and will be re-written when
|
||||
* running the ASF driver selector tool. Any changes will be discarded.
|
||||
*/
|
||||
|
||||
// From module: Common SAM0 compiler driver
|
||||
#include <compiler.h>
|
||||
#include <status_codes.h>
|
||||
|
||||
// From module: Delay routines
|
||||
#include <delay.h>
|
||||
|
||||
// From module: Generic board support
|
||||
#include <board.h>
|
||||
|
||||
// From module: Interrupt management - SAM implementation
|
||||
#include <interrupt.h>
|
||||
|
||||
// From module: PORT - GPIO Pin Control
|
||||
#include <port.h>
|
||||
|
||||
// From module: Part identification macros
|
||||
#include <parts.h>
|
||||
|
||||
// From module: SERCOM Callback API
|
||||
#include <sercom.h>
|
||||
#include <sercom_interrupt.h>
|
||||
|
||||
// From module: SERCOM SPI - Serial Peripheral Interface (Callback APIs)
|
||||
#include <spi.h>
|
||||
#include <spi_interrupt.h>
|
||||
|
||||
// From module: SSD1306 OLED controller
|
||||
#include <ssd1306.h>
|
||||
|
||||
// From module: SYSTEM - Clock Management for SAML21
|
||||
#include <clock.h>
|
||||
#include <gclk.h>
|
||||
|
||||
// From module: SYSTEM - Core System Driver
|
||||
#include <system.h>
|
||||
|
||||
// From module: SYSTEM - I/O Pin Multiplexer
|
||||
#include <pinmux.h>
|
||||
|
||||
// From module: SYSTEM - Interrupt Driver For SAML21
|
||||
#include <system_interrupt.h>
|
||||
|
||||
// From module: SYSTEM - Power Management for SAM L21
|
||||
#include <power.h>
|
||||
|
||||
// From module: SYSTEM - Reset Management for SAM L21
|
||||
#include <reset.h>
|
||||
|
||||
#endif // ASF_H
|
|
@ -1,6 +0,0 @@
|
|||
<workspace>
|
||||
<batchBuild></batchBuild>
|
||||
<project>
|
||||
<path>$WS_DIR$\ssd1306_example_flash.ewp</path>
|
||||
</project>
|
||||
</workspace>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,50 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM L22 Xplained Pro board configuration.
|
||||
*
|
||||
* Copyright (c) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
|
||||
#ifndef CONF_BOARD_H_INCLUDED
|
||||
#define CONF_BOARD_H_INCLUDED
|
||||
|
||||
#endif /* CONF_BOARD_H_INCLUDED */
|
|
@ -1,171 +0,0 @@
|
|||
/**
|
||||
* \file
|
||||
*
|
||||
* \brief SAM L22 Clock configuration
|
||||
*
|
||||
* Copyright (C) 2015 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* \asf_license_start
|
||||
*
|
||||
* \page License
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an
|
||||
* Atmel microcontroller product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* \asf_license_stop
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
|
||||
*/
|
||||
#include <clock.h>
|
||||
|
||||
#ifndef CONF_CLOCKS_H_INCLUDED
|
||||
# define CONF_CLOCKS_H_INCLUDED
|
||||
|
||||
/* System clock bus configuration */
|
||||
# define CONF_CLOCK_FLASH_WAIT_STATES 0
|
||||
# define CONF_CLOCK_CPU_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
# define CONF_CLOCK_BACKUP_DIVIDER SYSTEM_MAIN_CLOCK_DIV_1
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSC16M configuration - Internal 16MHz oscillator */
|
||||
# define CONF_CLOCK_OSC16M_FREQ_SEL SYSTEM_OSC16M_4M
|
||||
# define CONF_CLOCK_OSC16M_ON_DEMAND true
|
||||
# define CONF_CLOCK_OSC16M_RUN_IN_STANDBY false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC configuration - External clock/oscillator */
|
||||
# define CONF_CLOCK_XOSC_ENABLE false
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC_EXTERNAL_FREQUENCY 12000000UL
|
||||
# define CONF_CLOCK_XOSC_STARTUP_TIME SYSTEM_XOSC_STARTUP_32768
|
||||
# define CONF_CLOCK_XOSC_AUTO_GAIN_CONTROL true
|
||||
# define CONF_CLOCK_XOSC_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_XOSC_CLOCK_FAILURE_DETECT false
|
||||
# define CONF_CLOCK_XOSC_CLOCK_FAILURE_DIV SYSTEM_CFD_DIV_128
|
||||
# define CONF_CLOCK_XOSC_CLOCK_FAILURE_EVENT_OUT false
|
||||
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_XOSC32K configuration - External 32KHz crystal/clock oscillator */
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE false
|
||||
# define CONF_CLOCK_XOSC32K_EXTERNAL_CRYSTAL SYSTEM_CLOCK_EXTERNAL_CRYSTAL
|
||||
# define CONF_CLOCK_XOSC32K_STARTUP_TIME SYSTEM_XOSC32K_STARTUP_65536
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_1KHZ_OUPUT false
|
||||
# define CONF_CLOCK_XOSC32K_ENABLE_32KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_XOSC32K_ON_DEMAND true
|
||||
# define CONF_CLOCK_XOSC32K_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_XOSC32K_CLOCK_FAILURE_DETECT false
|
||||
# define CONF_CLOCK_XOSC32K_CLOCK_FAILURE_DIV SYSTEM_CFD_DIV_1
|
||||
# define CONF_CLOCK_XOSC32K_CLOCK_FAILURE_EVENT_OUT false
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_OSCULP32K configuration - Internal Ultra Low Power 32KHz oscillator */
|
||||
# define CONF_CLOCK_OSCULP32K_ENABLE_1KHZ_OUTPUT true
|
||||
# define CONF_CLOCK_OSCULP32K_ENABLE_32KHZ_OUTPUT true
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DFLL configuration - Digital Frequency Locked Loop */
|
||||
# define CONF_CLOCK_DFLL_ENABLE false
|
||||
# define CONF_CLOCK_DFLL_LOOP_MODE SYSTEM_CLOCK_DFLL_LOOP_MODE_OPEN
|
||||
# define CONF_CLOCK_DFLL_ON_DEMAND false
|
||||
# define CONF_CLOCK_DFLL_RUN_IN_STANDBY false
|
||||
|
||||
/* DFLL open loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_FINE_VALUE (512)
|
||||
|
||||
/* DFLL closed loop mode configuration */
|
||||
# define CONF_CLOCK_DFLL_SOURCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
# define CONF_CLOCK_DFLL_MULTIPLY_FACTOR (48000000 / 32768)
|
||||
# define CONF_CLOCK_DFLL_QUICK_LOCK true
|
||||
# define CONF_CLOCK_DFLL_TRACK_AFTER_FINE_LOCK true
|
||||
# define CONF_CLOCK_DFLL_KEEP_LOCK_ON_WAKEUP true
|
||||
# define CONF_CLOCK_DFLL_ENABLE_CHILL_CYCLE true
|
||||
# define CONF_CLOCK_DFLL_MAX_COARSE_STEP_SIZE (0x1f / 4)
|
||||
# define CONF_CLOCK_DFLL_MAX_FINE_STEP_SIZE (0xff / 4)
|
||||
|
||||
/* SYSTEM_CLOCK_SOURCE_DPLL configuration - Digital Phase-Locked Loop */
|
||||
# define CONF_CLOCK_DPLL_ENABLE false
|
||||
# define CONF_CLOCK_DPLL_ON_DEMAND true
|
||||
# define CONF_CLOCK_DPLL_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_DPLL_LOCK_BYPASS false
|
||||
# define CONF_CLOCK_DPLL_WAKE_UP_FAST false
|
||||
# define CONF_CLOCK_DPLL_LOW_POWER_ENABLE false
|
||||
|
||||
# define CONF_CLOCK_DPLL_LOCK_TIME SYSTEM_CLOCK_SOURCE_DPLL_LOCK_TIME_DEFAULT
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_CLOCK SYSTEM_CLOCK_SOURCE_DPLL_REFERENCE_CLOCK_XOSC32K
|
||||
# define CONF_CLOCK_DPLL_FILTER SYSTEM_CLOCK_SOURCE_DPLL_FILTER_DEFAULT
|
||||
# define CONF_CLOCK_DPLL_PRESCALER SYSTEM_CLOCK_SOURCE_DPLL_DIV_1
|
||||
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_FREQUENCY 32768
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_DIVIDER 1
|
||||
# define CONF_CLOCK_DPLL_OUTPUT_FREQUENCY 48000000
|
||||
|
||||
/* DPLL GCLK reference configuration */
|
||||
# define CONF_CLOCK_DPLL_REFERENCE_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
/* DPLL GCLK lock timer configuration */
|
||||
# define CONF_CLOCK_DPLL_LOCK_GCLK_GENERATOR GCLK_GENERATOR_1
|
||||
|
||||
/* Set this to true to configure the GCLK when running clocks_init. If set to
|
||||
* false, none of the GCLK generators will be configured in clocks_init(). */
|
||||
# define CONF_CLOCK_CONFIGURE_GCLK true
|
||||
|
||||
/* Configure GCLK generator 0 (Main Clock) */
|
||||
# define CONF_CLOCK_GCLK_0_ENABLE true
|
||||
# define CONF_CLOCK_GCLK_0_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_0_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_0_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_0_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 1 */
|
||||
# define CONF_CLOCK_GCLK_1_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_1_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_1_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_XOSC32K
|
||||
# define CONF_CLOCK_GCLK_1_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_1_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 2 */
|
||||
# define CONF_CLOCK_GCLK_2_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_2_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_2_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_2_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_2_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 3 */
|
||||
# define CONF_CLOCK_GCLK_3_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_3_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_3_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_3_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_3_OUTPUT_ENABLE false
|
||||
|
||||
/* Configure GCLK generator 4 */
|
||||
# define CONF_CLOCK_GCLK_4_ENABLE false
|
||||
# define CONF_CLOCK_GCLK_4_RUN_IN_STANDBY false
|
||||
# define CONF_CLOCK_GCLK_4_CLOCK_SOURCE SYSTEM_CLOCK_SOURCE_OSC16M
|
||||
# define CONF_CLOCK_GCLK_4_PRESCALER 1
|
||||
# define CONF_CLOCK_GCLK_4_OUTPUT_ENABLE false
|
||||
|
||||
#endif /* CONF_CLOCKS_H_INCLUDED */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue