\hypertarget{bsp___m_a_x6675_8cpp_source}{}\doxysection{bsp\+\_\+\+MAX6675.\+cpp}
\label{bsp___m_a_x6675_8cpp_source}\index{D:/gitt/MicrochipFor32/bsp\_Device/bsp\_MAX6675.cpp@{D:/gitt/MicrochipFor32/bsp\_Device/bsp\_MAX6675.cpp}}
\mbox{\hyperlink{bsp___m_a_x6675_8cpp}{浏览该文件的文档.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00001}00001 \textcolor{comment}{/*-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00002}00002 \textcolor{comment}{ \#}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00003}00003 \textcolor{comment}{ \#  Copyright (c) 2022 Yuankang Liang(XerolySkinner)}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00004}00004 \textcolor{comment}{ \#}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00005}00005 \textcolor{comment}{ \#  本软件按原样提供,无任何明示或暗示}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00006}00006 \textcolor{comment}{ \#  在任何情况下,作者都不承担任何损害赔偿责任}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00007}00007 \textcolor{comment}{ \#}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00008}00008 \textcolor{comment}{ \#  使用的许可声明:}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00009}00009 \textcolor{comment}{ \#  1.  不得歪曲本软件的来源,你不能声称你编写了原始软件.}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00010}00010 \textcolor{comment}{ \#  2.  免费授予以任何目的,前提是版权声明出现在所有副本中.}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00011}00011 \textcolor{comment}{ \#      并且版权声明和许可声明同时出现.}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00012}00012 \textcolor{comment}{ \#  3.  你有使用,复制,修改,分发,和销售本软件的许可.}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00013}00013 \textcolor{comment}{ \#  4.  如果你在产品中使用,产品文档中的声明是赞赏的但不是必须的.}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00014}00014 \textcolor{comment}{ \#  5.  本通知不得从任何来源删除或更改.}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00015}00015 \textcolor{comment}{ \#}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00016}00016 \textcolor{comment}{ \#  Yuankang Liang(XerolySkinner)}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00017}00017 \textcolor{comment}{ \#      E-\/mail:zabbcccbbaz@163.com}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00018}00018 \textcolor{comment}{ \#      QQ:2715099320}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00019}00019 \textcolor{comment}{ \#      Mobile Phone:13005636215}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00020}00020 \textcolor{comment}{ \#}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00021}00021 \textcolor{comment}{ \#  All rights reserved.}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00022}00022 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00023}00023 }
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00034}00034 \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00035}00035 \textcolor{comment}{//  头文件}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00036}00036 \textcolor{comment}{//  }}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00037}00037 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{bsp___m_a_x6675_8h}{bsp\_MAX6675.h}}"{}}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00039}00039 \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00040}00040 \textcolor{comment}{//  构造函数}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00041}00041 \textcolor{comment}{//  }}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00049}\mbox{\hyperlink{classbsp___m_a_x6675_ae241abb7c21d7bf551543046a92e6025}{00049}} \textcolor{comment}{}\mbox{\hyperlink{classbsp___m_a_x6675_ae241abb7c21d7bf551543046a92e6025}{bsp\_MAX6675::bsp\_MAX6675}}(}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00050}00050     SPI\_HandleTypeDef *hspi,}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00051}00051     GPIO\_TypeDef* GPIOx\_CS, uint16\_t GPIO\_Pin\_CS}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00052}00052     ) \{}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00053}00053     \mbox{\hyperlink{classbsp___m_a_x6675_a6b4e52e8861a88b7201c1bb5e70aa40a}{bsp\_MAX6675::hspi}}=\mbox{\hyperlink{classbsp___m_a_x6675_a6b4e52e8861a88b7201c1bb5e70aa40a}{hspi}};}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00054}00054     \mbox{\hyperlink{classbsp___m_a_x6675_a546cf5ce462d8bee441b66ca7e6c270a}{bsp\_MAX6675::GPIOx\_CS}} = \mbox{\hyperlink{classbsp___m_a_x6675_a546cf5ce462d8bee441b66ca7e6c270a}{GPIOx\_CS}};}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00055}00055     \mbox{\hyperlink{classbsp___m_a_x6675_a925d408718c644d56e5ffebd25150c4f}{bsp\_MAX6675::GPIO\_Pin\_CS}} = \mbox{\hyperlink{classbsp___m_a_x6675_a925d408718c644d56e5ffebd25150c4f}{GPIO\_Pin\_CS}};\}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00057}00057 \textcolor{comment}{//-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/-\/}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00058}00058 \textcolor{comment}{//  内含函数}}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00059}00059 \textcolor{comment}{//  }}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00064}\mbox{\hyperlink{classbsp___m_a_x6675_aaf35defa67c560c795005ba8ee61324c}{00064}} \textcolor{comment}{}\textcolor{keywordtype}{float} \mbox{\hyperlink{classbsp___m_a_x6675_aaf35defa67c560c795005ba8ee61324c}{bsp\_MAX6675::ReadTemperature}}(\textcolor{keywordtype}{void}) \{}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00065}00065     \mbox{\hyperlink{varint_8h_ace9d960e74685e2cd84b36132dbbf8aa}{u16}} tmps = 0;}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00066}00066     \mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} txdata[2] = \{ 0xFF,0xFF \};}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00067}00067     HAL\_GPIO\_WritePin(\mbox{\hyperlink{classbsp___m_a_x6675_a546cf5ce462d8bee441b66ca7e6c270a}{GPIOx\_CS}}, \mbox{\hyperlink{classbsp___m_a_x6675_a925d408718c644d56e5ffebd25150c4f}{GPIO\_Pin\_CS}}, GPIO\_PIN\_RESET);}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00068}00068     HAL\_SPI\_TransmitReceive(\mbox{\hyperlink{classbsp___m_a_x6675_a6b4e52e8861a88b7201c1bb5e70aa40a}{hspi}}, txdata, (\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}*)(\&tmps), 1, 1000);}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00069}00069     HAL\_GPIO\_WritePin(\mbox{\hyperlink{classbsp___m_a_x6675_a546cf5ce462d8bee441b66ca7e6c270a}{GPIOx\_CS}}, \mbox{\hyperlink{classbsp___m_a_x6675_a925d408718c644d56e5ffebd25150c4f}{GPIO\_Pin\_CS}}, GPIO\_PIN\_SET);}
\DoxyCodeLine{\Hypertarget{bsp___m_a_x6675_8cpp_source_l00070}00070     \textcolor{keywordflow}{return} (tmps >> 3) * 1024.0 / 4096;\}}

\end{DoxyCode}
