This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

求助中断嵌套的问题

我用的是C6748,用的startware里的例程,打算采用中断嵌套,查看相关手册,里面提到了以下几个步骤:

1.在中断嵌套里提出的几个必须步骤:

进中断时:1. The contents of IRP (or NRP) must be saved

                  2. The contents of the PGIE bit must be saved

                  3. The contents of ITSR must be saved

                  4. The GIE bit must be set to 1

出中断前:1. The GIE bit must be first cleared to 0                 

                  2. The PGIE bit saved value must be restored

                  3. The contents of ITSR must be restored

                  4. The IRP (or NRP) saved value must be restored

请问,这两个步骤对应的C代码怎么写,保存和恢复有相应的API函数吗?谢谢!