STM32HAL-最简单的长、短、多击按键框架

目录

 概述 

一、开发环境

二、STM32CubeMx配置

三、编码 

四、运行结果

五、总结


 概述 

       本文章使用最简单的写法实现长、短、多击按键框架,非常适合移植各类型单片机,特别是资源少的芯片上。接下来将在stm32单片机上实现,只需占用1个定时器作为时钟扫描按键即可。

一、开发环境

1、硬件平台
     STM32F401CEU6
     内部Flash : 512Kbytes,SARM : 96 Kbytes

二、STM32CubeMx配置

 2.1、系统时钟配置

2.2、下载调试配置

2.3、TIM配置(1ms中断)

2.4、usart1配置

2.5、生成代码

2.6、编译工程

三、编码 

1、usart.c添加打印

/* USER CODE BEGIN 1 */
#include "stdio.h"
#ifdef __GNUC__/* With GCC/RAISONANCE, small printf (option LD Linker->Libraries->Small printfset to 'Yes') calls __io_putchar() */#define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
#else#define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
#endif /* __GNUC__ */
/*** @brief  Retargets the C library printf function to the USART.* @param  None* @retval None*/
PUTCHAR_PROTOTYPE
{/* Place your implementation of fputc here *//* e.g. write a character to the EVAL_COM1 and Loop until the end of transmission */HAL_UART_Transmit(&huart1, (uint8_t *)&ch, 1, 0xFFFF);return ch;
}int fgetc(FILE * f)
{uint8_t ch = 0;HAL_UART_Receive(&huart1, (uint8_t *)&ch, 1, 0xffff);return ch;
}/* USER CODE END 1 */

2、tim1.c

/* USER CODE BEGIN Header */
/********************************************************************************* @file    tim.c* @brief   This file provides code for the configuration*          of the TIM instances.******************************************************************************* @attention** Copyright (c) 2023 STMicroelectronics.* All rights reserved.** This software is licensed under terms that can be found in the LICENSE file* in the root directory of this software component.* If no LICENSE file comes with this software, it is provided AS-IS.********************************************************************************/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "tim.h"/* USER CODE BEGIN 0 *//* USER CODE END 0 */TIM_HandleTypeDef htim1;/* TIM1 init function */
void MX_TIM1_Init(void)
{/* USER CODE BEGIN TIM1_Init 0 *//* USER CODE END TIM1_Init 0 */TIM_ClockConfigTypeDef sClockSourceConfig = {0};TIM_MasterConfigTypeDef sMasterConfig = {0};/* USER CODE BEGIN TIM1_Init 1 *//* USER CODE END TIM1_Init 1 */htim1.Instance = TIM1;htim1.Init.Prescaler = 84-1;htim1.Init.CounterMode = TIM_COUNTERMODE_UP;htim1.Init.Period = 1000-1;htim1.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;htim1.Init.RepetitionCounter = 0;htim1.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;if (HAL_TIM_Base_Init(&htim1) != HAL_OK){Error_Handler();}sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;if (HAL_TIM_ConfigClockSource(&htim1, &sClockSourceConfig) != HAL_OK){Error_Handler();}sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;if (HAL_TIMEx_MasterConfigSynchronization(&htim1, &sMasterConfig) != HAL_OK){Error_Handler();}/* USER CODE BEGIN TIM1_Init 2 *//* USER CODE END TIM1_Init 2 */}void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* tim_baseHandle)
{if(tim_baseHandle->Instance==TIM1){/* USER CODE BEGIN TIM1_MspInit 0 *//* USER CODE END TIM1_MspInit 0 *//* TIM1 clock enable */__HAL_RCC_TIM1_CLK_ENABLE();/* TIM1 interrupt Init */HAL_NVIC_SetPriority(TIM1_UP_TIM10_IRQn, 0, 0);HAL_NVIC_EnableIRQ(TIM1_UP_TIM10_IRQn);/* USER CODE BEGIN TIM1_MspInit 1 *//* USER CODE END TIM1_MspInit 1 */}
}void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* tim_baseHandle)
{if(tim_baseHandle->Instance==TIM1){/* USER CODE BEGIN TIM1_MspDeInit 0 *//* USER CODE END TIM1_MspDeInit 0 *//* Peripheral clock disable */__HAL_RCC_TIM1_CLK_DISABLE();/* TIM1 interrupt Deinit */HAL_NVIC_DisableIRQ(TIM1_UP_TIM10_IRQn);/* USER CODE BEGIN TIM1_MspDeInit 1 *//* USER CODE END TIM1_MspDeInit 1 */}
}/* USER CODE BEGIN 1 */
#include "stdio.h"
#include "button.h"int timeCount = 0;
int timeCount_1ms = 0;SystemButtonObj sys_btn_obj;void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim){if(htim->Instance == TIM1){timeCount++;timeCount_1ms++; if ((timeCount_1ms % 10) == 0) {    //10mstimeCount_1ms = 0;GPIO_PinState PinState = HAL_GPIO_ReadPin(KEY_GPIO_Port, KEY_Pin);	//down isrif ((PinState == false) && (sys_btn_obj.flag == false)) {sys_btn_obj.flag = true;}button_handler(&sys_btn_obj, PinState);}if(timeCount == 1000){timeCount = 0;//printf("time + 1s\n");}}
}/* USER CODE END 1 */

3、在根目录创建button文件夹,分别有button.c、button.h文件组成。
1)、button.c文件

#include<stdbool.h>
#include "button.h"void button_handler(SystemButtonObj *btn_obj, uint8_t press_state)
{//printf("btn_obj->flag:%d\r\n", btn_obj->flag);if (btn_obj->flag == false) {return;}	if (press_state == BUTTON_RELEASE) { //释放按键if ((btn_obj->dow_counter != 0) && (btn_obj->long_press == 1)) {btn_obj->long_press = 0;btn_obj->dow_counter = 0;return;}if (btn_obj->long_press == 1) {btn_obj->flag = false;return;}if (btn_obj->dow_counter > 2) {btn_obj->click_cnt++;//printf(" btn_obj->click_cnt %d, SHORT_PRESS_RELEASE_CNT %d LONG_PRESS_TRIGGER_TIME %d \r\n", btn_obj->click_cnt, SHORT_PRESS_RELEASE_CNT, LONG_PRESS_TRIGGER_TIME);}if (btn_obj->click_cnt) {btn_obj->up_counter++;if (btn_obj->up_counter > DOUBLE_PRESS_RELEASE_CNT) {  //printf(" btn_obj->up_counter %d SHORT_PRESS_RELEASE_CNT %d\r\n", btn_obj->up_counter, SHORT_PRESS_RELEASE_CNT);if (btn_obj->click_cnt == 1) {printf("counter %d, short \r\n", btn_obj->up_counter);} else if (btn_obj->click_cnt == 2) {printf("counter %d, double \r\n", btn_obj->up_counter);} else {printf("counter %d, multihit \r\n", btn_obj->up_counter);}btn_obj->click_cnt = 0;btn_obj->up_counter = 0;btn_obj->flag = false;}}btn_obj->dow_counter = 0; //清除计数变量} if (press_state == btn_obj->press_status) { //低电平有效//printf(" hahahaha press_state %d \r\n", press_state);btn_obj->dow_counter++; //计算次数//printf("counter %d, press_state:%d\r\n", btn_obj->dow_counter, press_state);// 不松手的长按if ((btn_obj->dow_counter > LONG_PRESS_TRIGGER_TIME) && (btn_obj->long_press == 0)) {btn_obj->long_press = 1;sys_btn_obj.press_event = ET_LONG_PRESS_EVENT;printf("long press\r\n");}if (btn_obj->dow_counter > RESTART_TRIGGER_TIME) { //超长时间,重启事件printf("restart press\r\n");sys_btn_obj.press_event = ET_RESTART_PRESS_EVENT;}}}void key_event_handler(void)
{switch (sys_btn_obj.press_event){case ET_IDLE_PRESS_EVENT:// printf("ET_IDLE_PRESS_EVENT\r\n");break;case ET_SHORT_PRESS_EVENT:printf("ET_SHORT_PRESS_EVENT\r\n");sys_btn_obj.press_event = ET_IDLE_PRESS_EVENT;break;case ET_DOUBLE_PRESS_EVENT:printf("ET_DOUBLE_PRESS_EVENT\r\n");sys_btn_obj.press_event = ET_IDLE_PRESS_EVENT;break;case ET_LONG_PRESS_EVENT:printf("ET_LONG_PRESS_EVENT\r\n");sys_btn_obj.press_event = ET_IDLE_PRESS_EVENT;break;case ET_RESTART_PRESS_EVENT:printf("ET_RESTART_PRESS_EVENT\r\n");sys_btn_obj.press_event = ET_IDLE_PRESS_EVENT;break;default :break;}
}

2)、button.h文件

#ifndef __BUTTON_H__
#define __BUTTON_H__#ifdef __cplusplus
extern "C" {
#endif#define BUTTON_TIMER_INTERVAL		(50)
#define LONG_PRESS_TRIGGER_TIME		(1500 / BUTTON_TIMER_INTERVAL)
#define RESTART_TRIGGER_TIME		((8 * 1000) / BUTTON_TIMER_INTERVAL)
//#define SHORT_PRESS_RELEASE_CNT		(200 / BUTTON_TIMER_INTERVAL)
#define DOUBLE_PRESS_RELEASE_CNT	(400 / BUTTON_TIMER_INTERVAL)enum {  BUTTON_PRESS = 0,  BUTTON_RELEASE = 1, 
};typedef enum {ET_IDLE_PRESS_EVENT,ET_SHORT_PRESS_EVENT,ET_DOUBLE_PRESS_EVENT,ET_LONG_PRESS_EVENT,ET_RESTART_PRESS_EVENT,
}BTN_EVENT_TYPE;typedef struct {uint8_t 		flag:1;uint8_t			press_status:1;uint8_t			long_press:1;uint8_t			double_press:1;uint8_t			click_cnt;uint8_t			up_counter;uint8_t			dow_counter;BTN_EVENT_TYPE  press_event;
} SystemButtonObj;extern SystemButtonObj sys_btn_obj;void button_handler(SystemButtonObj *btn_obj, uint8_t press_state);
void key_event_handler(void);#ifdef __cplusplus
}
#endif#endif 

 3)、main.c文件

/* USER CODE BEGIN Header */
/********************************************************************************* @file           : main.c* @brief          : Main program body******************************************************************************* @attention** Copyright (c) 2023 STMicroelectronics.* All rights reserved.** This software is licensed under terms that can be found in the LICENSE file* in the root directory of this software component.* If no LICENSE file comes with this software, it is provided AS-IS.********************************************************************************/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
#include "iwdg.h"
#include "tim.h"
#include "usart.h"
#include "gpio.h"/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "stdio.h"
#include "button.h"
/* USER CODE END Includes *//* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD *//* USER CODE END PTD *//* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD *//* USER CODE END PD *//* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM *//* USER CODE END PM *//* Private variables ---------------------------------------------------------*//* USER CODE BEGIN PV *//* USER CODE END PV *//* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
/* USER CODE BEGIN PFP *//* USER CODE END PFP *//* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 *//* USER CODE END 0 *//*** @brief  The application entry point.* @retval int*/
int main(void)
{/* USER CODE BEGIN 1 *//* USER CODE END 1 *//* MCU Configuration--------------------------------------------------------*//* Reset of all peripherals, Initializes the Flash interface and the Systick. */HAL_Init();/* USER CODE BEGIN Init *//* USER CODE END Init *//* Configure the system clock */SystemClock_Config();/* USER CODE BEGIN SysInit *//* USER CODE END SysInit *//* Initialize all configured peripherals */MX_GPIO_Init();MX_USART1_UART_Init();MX_TIM1_Init();
//  MX_IWDG_Init();/* USER CODE BEGIN 2 */HAL_TIM_Base_Start_IT(&htim1);printf("heihei button \r\n");/* USER CODE END 2 *//* Infinite loop *//* USER CODE BEGIN WHILE */while (1){key_event_handler();/* USER CODE END WHILE *//* USER CODE BEGIN 3 */}/* USER CODE END 3 */
}/*** @brief System Clock Configuration* @retval None*/
void SystemClock_Config(void)
{RCC_OscInitTypeDef RCC_OscInitStruct = {0};RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};/** Configure the main internal regulator output voltage*/__HAL_RCC_PWR_CLK_ENABLE();__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);/** Initializes the RCC Oscillators according to the specified parameters* in the RCC_OscInitTypeDef structure.*/RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI|RCC_OSCILLATORTYPE_HSE;RCC_OscInitStruct.HSEState = RCC_HSE_ON;RCC_OscInitStruct.LSIState = RCC_LSI_ON;RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;RCC_OscInitStruct.PLL.PLLM = 25;RCC_OscInitStruct.PLL.PLLN = 168;RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;RCC_OscInitStruct.PLL.PLLQ = 4;if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK){Error_Handler();}/** Initializes the CPU, AHB and APB buses clocks*/RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK){Error_Handler();}
}/* USER CODE BEGIN 4 *//* USER CODE END 4 *//*** @brief  This function is executed in case of error occurrence.* @retval None*/
void Error_Handler(void)
{/* USER CODE BEGIN Error_Handler_Debug *//* User can add his own implementation to report the HAL error return state */__disable_irq();while (1){}/* USER CODE END Error_Handler_Debug */
}#ifdef  USE_FULL_ASSERT
/*** @brief  Reports the name of the source file and the source line number*         where the assert_param error has occurred.* @param  file: pointer to the source file name* @param  line: assert_param error line source number* @retval None*/
void assert_failed(uint8_t *file, uint32_t line)
{/* USER CODE BEGIN 6 *//* User can add his own implementation to report the file name and line number,ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) *//* USER CODE END 6 */
}
#endif /* USE_FULL_ASSERT */

注意:keil上需要勾选Use MicroLIB,否则CubeMX生成的串口工程无法打印问题

四、运行结果

      

五、总结

        好了,终于介绍完毕,以后裸机开发,有了按键框架方便很多,可移植到C51或者资源更少的芯片上,感谢参阅 ^_^。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/21208.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

数据分析必备:一步步教你如何用Pandas做数据分析(15)

1、Pandas 数据丢失 Pandas 数据丢失的操作实例 在现实生活中&#xff0c;数据丢失始终是一个问题。机器学习和数据挖掘等领域在模型预测的准确性方面面临严重问题&#xff0c;因为缺少值会导致数据质量较差。在这些领域中&#xff0c;缺失值处理是使模型更准确和有效的主要重…

定个小目标之每天刷LeetCode热题(7)

今天这道题是道简单题&#xff0c;使用双指针进行迭代即可&#xff0c;画了下草图如下 代码如下 class Solution {public ListNode reverseList(ListNode head) {if (head null || head.next null) {return head;}ListNode p head, q head.next, temp null;while (q ! nu…

Writerside生成在线帮助文档或用户手册软件基础使用教程

Writerside是JetBrains出的一个技术文档工具&#xff0c;既能用在JetBrains IDE上&#xff0c;也能单独用。它能帮你轻松写、建、测、发技术文档&#xff0c;像产品说明、API参考、开发指南等都能搞定。 特点&#xff1a; 文档即代码&#xff1a;它让你像管代码一样管文档&…

海光CPU:国产信创的“芯“动力解读

国产信创CPU-海光CPU CPU&#xff1a;信创根基&#xff0c;国之重器 国产CPU形成三大阵营&#xff1a;自主架构、x86及ARM。自主阵营中&#xff0c;龙芯和申威以LoongArch和SW-64为基石&#xff1b;ARM阵营由鲲鹏、飞腾主导&#xff0c;依托ARM授权研发处理器&#xff1b;x86阵…

【Linux|数据恢复】extundelete和ext4magic数据恢复工具使用

环境&#xff1a;Centos7.6_x86 一、extundelete工具 1、extundelete介绍 Extundelete 是一个数据恢复工具&#xff0c;用于从 ext3 或 ext4 分区中恢复删除文件。根据官网0.2.4版本介绍是支持ext4&#xff0c;但实际上使用发现ext4格式有些问题&#xff0c;会报以下错误&…

动态SQL IF语句

IF语句学习 第一种写法(标准) 我们先来看以下标准写法: select * from .. <where> <if test""> and ....... <if test""> and ....... <where> 我们用了一个where标签 , 内嵌if语句 第二种写法: 这是第二种写法:不用where标…

大降分!重邮计算机专硕复试线大降50分!重庆邮电计算机考研考情分析!

重庆邮电大学&#xff08;Chongqing University of Posts and Telecommunications&#xff09;简称重邮&#xff0c;坐落于中国重庆市主城区南山风景区内&#xff0c;是中华人民共和国工业和信息化部与重庆市人民政府共建的教学研究型大学&#xff0c;入选国家“中西部高校基础…

c++学生管理系统

想要实现的功能 1&#xff0c;可以增加学生的信息&#xff0c;包括&#xff08;姓名&#xff0c;学号,c成绩&#xff0c;高数成绩&#xff0c;英语成绩&#xff09; 2&#xff0c;可以删除学生信息 3&#xff0c;修改学生信息 4&#xff0c;显示所有学生信息 5&#xff0c…

支持AMD GPU的llm.c

anthonix/llm.c: LLM training in simple, raw C/HIP for AMD GPUs (github.com) llm.c for AMD devices This is a fork of Andrej Karpathys llm.c with support for AMD devices. 性能 在单个7900 XTX显卡上使用默认设置&#xff0c;目前的训练步骤耗时约为79毫秒&#x…

Docker的安装、启动和配置镜像加速

前言&#xff1a; Docker 分为 CE 和 EE 两大版本。CE 即社区版&#xff08;免费&#xff0c;支持周期 7 个月&#xff09;&#xff0c;EE 即企业版&#xff0c;强调安全&#xff0c;付费使用&#xff0c;支持周期 24 个月。 而企业部署一般都是采用Linux操作系统&#xff0c;而…

【软件设计师】2022年上半年真题解析

​​冯诺依曼计算机体系结构的基本特点是&#xff1a; A. 程序指令和数据都采用二进制表示 - 这是正确的&#xff0c;因为冯诺依曼架构下的计算机使用二进制形式来表示和处理所有信息&#xff0c;包括指令和数据。 B. 程序指令总是存储在主存中&#xff0c;而数据则存储在高速…

IsoBench:多模态基础模型性能的基准测试与优化

随着多模态基础模型的快速发展&#xff0c;如何准确评估这些模型在不同输入模态下的性能成为了一个重要课题。本文提出了IsoBench&#xff0c;一个基准数据集&#xff0c;旨在通过提供多种同构&#xff08;isomorphic&#xff09;表示形式的问题&#xff0c;来测试和评估多模态…

算法(十三)回溯算法---N皇后问题

文章目录 算法概念经典例子 - N皇后问题什么是N皇后问题&#xff1f;实现思路 算法概念 回溯算法是类似枚举的深度优先搜索尝试过程&#xff0c;主要是再搜索尝试中寻找问题的解&#xff0c;当发生不满足求解条件时&#xff0c;就会”回溯“返回&#xff08;也就是递归返回&am…

enum4linux一键查询SMB信息(KALI工具系列十六)

目录 1、KALI LINUX简介 2、enum4linux工具简介 3、在KALI中使用enum4linux 3.1 目标主机IP&#xff08;win&#xff09; ​编辑 3.2 KALI的IP 4、操作示例 4.1 运行工具 4.2 列出用户名 4.3 提取用户名 4.4 使用自定义RID范围 4.5 列出组 4.6 列出共享文件夹 4.7…

网络监听技术

网络监听技术 网络监听概述网络监听环境 流量劫持网络环境共享式网络监听原理交换式网络监听交换机的工作方式交换网络监听&#xff1a;交换机集线器交换网络监听&#xff1a;端口镜像交换网络监听&#xff1a;MAC洪泛交换网络监听&#xff1a;MAC洪泛交换网络监听&#xff1a;…

动态SQL where, choose语句

where语句就一个<where>标签, 很简单, 不再过多赘述 接下来我们来看 choose语句的使用 其实choose语句就像java里的swith语句 , 如果语句前面的生效 , 后面的就不会生效了 可以定义查询的优先级

读人工智能时代与人类未来笔记19_读后总结与感想兼导读

1. 基本信息 人工智能时代与人类未来 (美)亨利基辛格,(美)埃里克施密特,(美)丹尼尔胡滕洛赫尔 著 中信出版社,2023年6月出版 1.1. 读薄率 书籍总字数145千字&#xff0c;笔记总字数39934字。 读薄率39934145000≈27.5% 1.2. 读厚方向 千脑智能 脑机穿越 未来呼啸而来 …

【工具】 MyBatis Plus的SQL拦截器自动翻译替换“?“符号为真实数值

【工具】 MyBatis Plus的SQL拦截器自动翻译替换"?"符号为真实数值 使用MyBatis的配置如下所示&#xff1a; mybatis-plus:configuration:log-impl: org.apache.ibatis.logging.stdout.StdOutImpl调用接口&#xff0c;sql日志打印如下&#xff1a; 参数和sql语句不…

顶底背离的终极猜想和运用

这几天圈内都在传底蓓离什么的。作为严肃的量化自媒体&#xff0c;我们就不跟着吃这波瓜了。不过&#xff0c;我一直很关注技术指标的顶背离和底背离&#xff0c;一直在追问它的成因如何&#xff0c;以及如何预测。 底蓓离把我目光再次吸引到这个领域来&#xff0c;于是突然有…

LitCTF 2024(公开赛道)——WP

目录 Misc 涐贪恋和伱、甾―⑺d毎兮毎秒 你说得对&#xff0c;但__ 盯帧珍珠 Everywhere We Go 关键&#xff0c;太关键了! 女装照流量 原铁&#xff0c;启动&#xff01; 舔到最后应有尽有 The love Web exx 一个....池子&#xff1f; SAS - Serializing Authent…