Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Examples): Fixed bug in FaceId RISC-V example #807

Merged
merged 23 commits into from
Nov 30, 2023
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add copyrights
  • Loading branch information
Jake-Carter committed Nov 7, 2023
commit 18020ecbdc44bb5ca60c174230c060b5903c10a0
40 changes: 29 additions & 11 deletions Libraries/MiscDrivers/Display/fonts/fonts.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/******************************************************************************
*
* Copyright 2023 Analog Devices, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************/

/**
* @file fonts.h
@@ -13,44 +30,45 @@

#ifdef FONT_LiberationSans12x12
extern const unsigned char Liberation_Sans12x12[];
#ifndef _font_table
#define _font_table Liberation_Sans12x12
#ifndef _font_char_table
#define _font_char_table Liberation_Sans12x12
#endif
#endif

#ifdef FONT_LiberationSans16x16
extern const unsigned char Liberation_Sans16x16[];
#ifndef _font_table
#define _font_table Liberation_Sans16x16
#ifndef _font_char_table
#define _font_char_table Liberation_Sans16x16
#endif
#endif

#ifdef FONT_LiberationSans19x19
extern const unsigned char Liberation_Sans19x19[];
#ifndef _font_table
#define _font_table Liberation_Sans19x19
#ifndef _font_char_table
#define _font_char_table Liberation_Sans19x19
#endif
#endif

#ifdef FONT_LiberationSans24x24
extern const unsigned char Liberation_Sans24x24[];
#ifndef _font_table
#define _font_table Liberation_Sans24x24
#ifndef _font_char_table
#define _font_char_table Liberation_Sans24x24
#endif
#endif

#ifdef FONT_LiberationSans28x28
extern const unsigned char Liberation_Sans28x28[];
#ifndef _font_table
#define _font_table Liberation_Sans28x28
#ifndef _font_char_table
#define _font_char_table Liberation_Sans28x28
#endif
#endif

/**
* @brief font table macro that can be used to access the selected font. When multiple
* fonts are enabled, the font table will point to the first font in the list.
*
*/
#define font_table _font_table
#define font_char_table _font_char_table

#endif

17 changes: 17 additions & 0 deletions Libraries/MiscDrivers/Display/fonts/fonts.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
###############################################################################
#
# Copyright 2023 Analog Devices, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
# If FONTS_DIR is not specified, this Makefile will locate itself.
FONTS_DIR ?= $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
FONTS_DIR := $(FONTS_DIR)